- Fixed cursor display position in Input component during horizontal scrolling by calculating position relative to visible text window instead of using fixed halfWidth value.
- Fixed full-screen redraws optimization by tracking previous rendered line count and avoiding unnecessary full redraws when changes occur above the viewport.
- Fixed scrollback clearing behavior by removing scrollback clear sequence (3J) and only clearing screen content, preventing unintended terminal scroll events.
- Fixed OSC 52 clipboard emission to only occur in real terminal environments (TTY), preventing unnecessary output in piped or headless contexts.
- Fixed error handling for OSC 52 clipboard writes to gracefully handle EPIPE errors when stdout is closed or piped to processes that exit early.
- Fixed `.git` directory appearing in autocomplete suggestions when filtering by prefix.
- Refined codepoint matching logic in key parsing to exclude latin letters and known symbols when matching base codepoints.
- Corrected editor test width parameters to properly validate text wrapping and cursor positioning behavior.
- Updated quote border symbol from ASCII pipe to Unicode box-drawing character for improved visual presentation.
- Added Windows-specific process handle duplication mechanism to safely manage process termination across multiple handles.
- Implemented Windows signal handling support with Signal enum variants (Terminate, Kill, Interrupt) and kill_process() function using Windows API.
- Added background job termination on cancellation with platform-specific implementations (TERM/KILL signals on Unix, TerminateProcess on Windows).
- Implemented cancellation token support in shell execution with proper cleanup of background jobs when timeout or abort occurs.
- Added test coverage for background job termination on timeout and abort scenarios.
- Added graceful shutdown timeout before aborting shell tasks to allow proper cleanup.
- Implemented 2-second timeout for task completion in run_shell_session before forceful abort.
- Implemented 2-second timeout for task completion in run_shell_oneshot before forceful abort.
- Added tokio_cancel.cancel() call in run_shell_oneshot cancellation path for consistency.
- Added explicit task abort and session cleanup to prevent bash session from getting stuck when interrupted.
- Ensured task is properly awaited after abort to allow graceful shutdown.
- Cleared session state on cancellation to prevent stale session references.
- Added PATH environment variable merging on Windows to deduplicate and normalize path entries.
- Enhanced Git path detection to support multiple installation patterns (cmd, bin, usr/bin, mingw variants).
- Implemented path normalization and deduplication logic to prevent duplicate entries in PATH.
- Refactored Windows Git path discovery to return multiple candidate paths instead of single path.
- Removed `output_mode` parameter from grep tool, consolidating all output to content mode with file grouping and match headers.
- Renamed grep context parameters from `context_pre`/`context_post` to `pre`/`post` for improved clarity.
- Removed `n` (line numbers) parameter from grep tool as line numbers are now always displayed.
- Reformatted grep output to display numbered matches with file paths, line numbers, and context lines with consistent alignment.
- Introduced `SearchParams` struct in Rust grep implementation to simplify parameter passing and improve code maintainability.
- Made `normalize_env_key` function const-eligible for compile-time evaluation in shell module.
- Split grep context parameter into separate contextBefore and contextAfter options for more granular control over context lines displayed before and after matches.
- Added configurable grep context defaults via grep.contextBefore and grep.contextAfter settings with reduced default values (1 line before, 3 lines after).
- Updated grep tool schema to use context_pre and context_post parameters instead of unified context parameter.
- Maintained backward compatibility by keeping legacy context field in SearchOptions and GrepOptions structs.
- Added resolve_context() function to handle logic for choosing between separate before/after context values or legacy unified context value.
- Added environment variable key normalization on Windows to handle case-insensitive PATH variable correctly.
- Introduced normalize_env_key() function with platform-specific implementations to normalize environment variable keys before setting them in the shell session.
- Added windows_by_handle feature flag for MetadataExt methods
- Changed OnceCell to OnceLock in is_root() for static compatibility
- Fixed HWND/HANDLE pointer comparisons to use .is_null()
- Implemented Windows-specific command execution utilities with CommandExt, ExitStatusExt, CommandFdInjectionExt, and CommandFgControlExt traits for process group and foreground control.
- Implemented Windows terminal configuration management with Config struct, from_term(), apply_to_term(), and terminal control methods including parent process ID and foreground window detection.
- Replaced stub implementations with actual Windows API calls for file permission checking (readable/writable) and device/inode retrieval in fs module.
- Implemented proper Windows elevation detection in is_root() using Windows API token information queries instead of always returning false.
- Trimmed quotes from PATH entries to handle Windows paths with quoted directories.
- Added System32 directory to default executable search paths on Windows.
- Implemented system32_path() helper function to resolve SystemRoot environment variable.
- Refactored ExecutablePathSearch to remove generic type parameter N and use pre-computed filename candidates instead of single filename.
- Extracted platform-specific candidate_filenames() functions to generate executable filename variants on Windows and Unix-like systems.
- Replaced manual PATH string splitting with std::env::split_paths() for cross-platform path parsing.
- Simplified find_in_path() method to delegate to pathsearch::search_for_executable() instead of custom path searching logic.
- Implemented executable_extensions() function with lazy initialization to parse PATHEXT environment variable on Windows.
- Enhanced executable() method to validate file extensions against known executable extensions instead of returning hardcoded true.
- Added renderCall and renderResult methods to MCPTool and DeferredMCPTool classes for TUI rendering of tool calls and results.
- Created new mcp/render.ts module providing JSON tree rendering functionality with configurable depth and line limits for terminal display.
- Updated renderResult signature in custom tool and extension types to accept optional args parameter for accessing original tool arguments during result rendering.
- Fixed method binding in extension and hook tool wrappers by applying .bind(tool) to renderCall and renderResult methods to preserve correct 'this' context.
- Added filter to skip .git directories in fuzzy_find_sync function to improve search performance.
Added #[cfg(not(windows))] to stubs/fs.rs PathExt implementation.
On Windows, both stubs (not unix) and windows modules were compiled,
causing duplicate impl PathExt for Path. Now Windows uses only
windows/fs.rs while WASM still uses stubs.
- Introduced new task scheduling system with CancelToken for cooperative cancellation, replacing Rayon-based work scheduling with libuv thread pool integration.
- Added Cancellable interface with timeoutMs and signal properties for unified timeout and abort signal handling across all async operations.
- Converted async functions (clipboard, html, image, shell, grep, glob) to synchronous functions returning task::Async wrappers for consistent cancellation semantics.
- Removed abortShellExecution() function and executionId tracking in favor of centralized CancelToken-based cancellation.
- Simplified htmlToMarkdown() signature by removing RequestOptions parameter and delegating cancellation to Cancellable interface.
- Replaced heap-allocated Vec with stack-allocated SmallVec in grep module for context lines and type filters to reduce allocations.
- Optimized process tree data structure in ps module from Vec to SmallVec with capacity 4 for typical process child counts.
- Changed shell module to use SmallVec for process IDs collection, reducing heap allocations in abort operations.
- Refactored text module to use SmallVec for token and line collections, avoiding heap allocations for typical text wrapping scenarios.
- Increased work profiler stack capacity from 2 to 4 elements and optimized stack collection using iterator copy.
- Added work profile capture to debug report bundle for improved profiling insights.
- Added work scheduling profiler with always-on circular buffer sampling to track CPU scheduling patterns and task execution times.
- Added `getWorkProfile()` native function to retrieve profiling data including folded stacks, markdown summary, SVG flamegraph, and metrics for the last N seconds.
- Added work profile debug menu item to visualize CPU scheduling patterns via flamegraph in the coding agent.
- Added work profile support to report bundles with folded stacks, summary, and flamegraph visualization.
- Updated `launch_blocking()` and `launch_async()` functions to accept task name tags for profiling instrumentation.
- Added dependencies on inferno, smallvec, and heapless crates for profiling infrastructure.
- Refactored shell session management to use per-instance sessions instead of global session map.
- Changed execution and shell identifiers from strings to u64 for improved performance and type safety.
- Simplified ExecutionControl struct to remove session_key field and use shell_id instead.
- Extracted ShellConfig struct to consolidate session configuration parameters.
- Refactored read_output function to use async I/O with improved UTF-8 handling and buffer management.
- Removed global SESSIONS map and session counter in favor of per-instance Arc-wrapped session storage.
- Added job-level status checking in CI watcher to fail fast on first job failure with detailed error reporting.
- Added automatic log tailing for failed CI jobs showing last 20 lines of output.
- Added process cancellation support via optional CancellationToken parameter to wait() methods across process execution layers.
- Implemented platform-specific process termination using SIGKILL on Unix and TerminateProcess on Windows when cancellation is triggered.
- Added ProcessWaitResult::Cancelled variant to represent cancelled process execution with exit code 130.
- Added windows-sys dependency with Win32_Foundation and Win32_System_Threading features for Windows process termination support.
- Removed process_id_tracker and process_group_id_tracker fields from ExecutionParameters struct to simplify process tracking.
- Added Windows PATH configuration to automatically detect and include Git's usr/bin directory in the shell environment.
- Added winreg dependency for Windows registry access to locate Git installations.
- Added interactive shell console subcommand to coding-agent CLI with support for working directory, timeout, and snapshot configuration.
- Added cancellation token support to ExecutionContext and ExecutionParameters for graceful shell execution interruption.
- Implemented cancellation checks throughout AST execution pipeline (Program, CompoundList, AndOrList, Pipeline, and all command types) to enable responsive interruption.
- Replaced process tracking mechanism with tokio_util CancellationToken for improved async cancellation handling.
- Added tokio-util 0.7.16 dependency to pi-natives crate for cancellation token support.
- Vendored brush-core crate locally to enable local development and patching.
- Added patch.crates-io section in Cargo.toml to redirect brush-core dependency to vendored version at crates/brush-core-vendored.
- Updated pi-natives Cargo.toml to use local path dependency for brush-core instead of external crate version.
- Reformatted fuzzy_find function body to single line with consistent indentation.
- Wrapped PhotonImage::new documentation comment to approximately 80 characters.
- Reordered import statement for brush_builtins to appear before brush_core imports.
- Moved SAFETY comment in text.rs to immediately precede the unsafe block it documents.
- Updated string formatting from positional arguments to inline variable syntax.
- Upgraded brush-core from 0.3.5 to 0.4.0 and added brush-builtins 0.1.0 dependency to support new builtin command framework.
- Refactored shell execution to use new ExecutionResult and ExecutionControlFlow types from brush-core 0.4.0, replacing previous ExitCode-based approach.
- Updated system_info disk refresh to use new sysinfo 0.38 API with single refresh(true) call instead of separate refresh_list() and refresh() calls.
- Added tokio full-featured runtime dependency to support async operations in pi-natives.
- Updated phf from 0.11 to 0.13 with macros feature for improved perfect hash function support.
- Fixed UTF-16 string handling in text.rs to properly strip trailing null bytes before conversion.
- Replaced tokio::task::spawn_blocking with custom launch_task abstraction across clipboard, find, grep, html, image, and shell modules.
- Introduced new work module providing Rayon-backed task scheduling for blocking operations in N-API exports.
- Simplified error handling by removing redundant join error mapping and consolidating to single-level error propagation.
- Unified task spawning pattern across all native modules to use consistent launch_task API with wait() method.
- Added Shell class to persistent shell session management with session caching and abort capabilities.
- Added find() function for file discovery with glob pattern matching and optional streaming callbacks.
- Exported ImageFormat enum from main natives package for image encoding format selection.
- Reorganized native bindings into modular type files with declaration merging pattern for better maintainability.
- Refactored shell execution to use persistent Shell instances instead of stateless executeShell function calls.
- Enhanced SystemInfo type with additional fields for distro, kernel, CPU, and disk information.
- Refactored PhotonImage API from standalone functions to instance methods with simplified naming conventions.
- Renamed PhotonImage.new_from_byteslice() to parse() for a simpler, more intuitive factory method API.
- Converted PhotonImage.get_width() and get_height() methods to width and height getter properties.
- Consolidated four separate encoding methods (getBytes, getBytesJpeg, getBytesWebp, getBytesGif) into a single encode(format, quality) method.
- Moved resize() from a standalone function to a PhotonImage instance method.
- Added ImageFormat enum to specify encoding formats (PNG, JPEG, WEBP, GIF) in the encode method.
- Removed manual resource management via free() and Symbol.dispose, simplifying PhotonImage lifecycle.
- Expanded environment variable filtering to exclude bash function definitions and additional shell-specific variables that should not be inherited by child processes.
- Added session-based shell execution with persistent shell instances and session management via sessionKey parameter.
- Added support for shell snapshots to initialize bash sessions with saved state via snapshotPath parameter.
- Added sessionEnv option to set environment variables once per session, separate from command-specific env variables.
- Added process group management functions (process_group_id and kill_process_group) for better process lifecycle control on Linux, macOS, and Windows.
- Changed env option to apply variables for the current command only, with session-level variables now managed via sessionEnv.
- Refactored shell execution to use async output queuing with enqueueChunk for proper chunk sequencing and improved timeout handling with process group termination.
- Added native system information collection via new getSystemInfo() function in pi-natives crate using sysinfo library.
- Exported SystemInfo type and getSystemInfo() function from @oh-my-pi/pi-natives package for cross-platform system details.
- Migrated system information collection in coding-agent from shell-based commands to native Rust bindings for improved performance and reliability.
- Removed shell configuration retrieval from environment information display in coding-agent.
- Refactored system-prompt.ts to use native getSystemInfo() instead of platform-specific shell commands and helper functions.
- Added sysinfo 0.30 dependency to pi-natives crate for native system information gathering.
- Added native clipboard support with copyToClipboard() and readImageFromClipboard() functions using arboard library.
- Exported ClipboardImage type for clipboard image data with MIME type information.
- Migrated clipboard operations from shell commands to native arboard bindings for improved performance and reliability.
- Implemented Rust native module in pi-natives crate providing cross-platform clipboard access for Linux, macOS, and Windows.
- Added TypeScript bindings and type definitions for clipboard functionality in natives package.
- Added support for keypad navigation keys (0-9, decimal) in Kitty keyboard protocol parsing.
- Implemented keypad-to-navigation key mapping function that translates keypad codepoints to standard navigation keys (arrows, home, end, page up/down, insert, delete).
- Enhanced ParsedKittySequence struct with text_codepoint field to track text representation of keys.
- Improved key matching logic to apply keypad navigation mapping when text codepoint is absent.
- Extended parse_csi_u parser to extract and validate text codepoints from Kitty protocol sequences.
- Added new public `wrapTextWithAnsi()` function to wrap text to a visible width while preserving ANSI escape codes across line breaks.
- Implemented ANSI state tracking and restoration logic to maintain color and formatting codes when wrapping multi-line text.
- Migrated `wrapTextWithAnsi` implementation from tui package to pi-natives package for better code organization and reusability.
- Added comprehensive test coverage for ANSI color code preservation across wrapped lines.
- Replaced Node.js-based persistent shell sessions with direct native calls for improved reliability and streaming.
- Integrated `brush-core` and `os_pipe` into the `pi-natives` crate for shell command execution.
- Removed the `shell-session.ts` module and its corresponding test suite.
- Updated `bash-executor` to leverage the new native shell execution.
- Reorganized system prompt guidance for parallel task execution, moving coordinator section earlier and restructuring parallel_reflex section for improved clarity.
- Added native process tree killing and listing functions via new `ps` module in pi-natives crate with platform-specific implementations (Linux /proc, macOS libproc, Windows CreateToolhelp32Snapshot).
- Refactored process termination logic to prioritize native process tree killing when available, improving reliability of process cleanup across platforms.
- Removed detached process spawning across codebase (bash-executor, shell-session, kernel, lsp client, markitdown conversion) in favor of native process tree management.
- Simplified ptree module by removing managed children tracking and postmortem cleanup hooks, delegating process lifecycle management to native implementations.
- Added development mode support for native binary builds via `--dev` flag and `OMP_DEV` environment variable.
- Added `dev:native` npm script for building debug native binaries in development environments.
- Changed native binary build process to conditionally use debug or release profiles based on development mode flag.
- Changed native addon loader to prioritize debug builds when `OMP_DEV` environment variable is set.
- Refactored keyboard parsing functions in pi-natives to use const functions and guard clauses for improved code clarity.