* fix: prevent UTF-8 panics on multi-byte characters (Thai, emoji, CJK)
Replace all byte-indexed string slicing (`&s[..n]`) with char-aware
operations across 10 locations in 7 files. Rust strings are UTF-8, so
byte slicing can land mid-character on Thai (3 bytes), emoji (4 bytes),
or CJK text and panic at runtime.
Fixes applied:
- git.rs: filter_log_output, format_status_output
- log_cmd.rs: error/warning message truncation (2 locations)
- env_cmd.rs: long value display, mask_value
- parser/mod.rs: truncate_output
- grep_cmd.rs: clean_line (pattern context + fallback truncation)
- wget_cmd.rs: compact_url, truncate_line, parse_error
Also adds safe_char_boundary() utility and 20 regression tests covering
Thai, emoji, and CJK input across all affected modules.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: collect chars once in compact_url to avoid redundant iteration
Address review feedback: collect chars into Vec once instead of
calling .chars() multiple times. Also fixes byte-vs-char length check.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: remove unused safe_char_boundary function and tests
Address review: function was defined but never called anywhere.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: convert remaining is_char_boundary to full .chars() approach
Address review: use consistent .chars() everywhere instead of
mixing byte-based is_char_boundary with char-based operations.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Add exec_time_ms column to SQLite schema and track execution time
for all rtk commands. Display time metrics in gain summary, daily/
weekly/monthly breakdowns, and JSON/CSV exports.
Changes:
- tracking.rs: Add exec_time_ms column, TimedExecution struct
- display_helpers.rs: Add format_duration() helper, update tables
- gain.rs: Display total/avg exec time in summary and by-command
- All command modules: Apply TimedExecution timer wrapper
- Exports: Include total_time_ms and avg_time_ms in JSON/CSV
Example output:
Total exec time: 24.6s (avg 34ms)
rtk cargo test 7 -86.1% 349ms avg
rtk git status 111 -84.1% 1ms avg
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add SQLite tracking for all commands (90-day history)
- Add rtk gain command with ASCII graph visualization
- Add config.rs for TOML configuration support
- Integrate tracking in all command modules
- Add CI/CD workflow for multi-platform releases (deb, rpm, win, mac)
- Add LICENSE file and improve .gitignore