# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ## [0.5.12] - 2026-07-27 ### Dependencies - `serde`: 1.0.228 → 1.0.229 (#242) - `regex`: 1.12.4 → 1.13.1 (#241, #249) - `toml`: 1.1.2 → 1.1.3 (#247) - `tokio`: 1.52.3 → 1.53.1 (#244, #252) - `anyhow`: 1.0.103 → 1.0.104 (#245) - `rust-i18n`: 4.1.0 → 4.2.1 (#248) - `futures`: 0.3.32 → 0.3.33 (#243) - `thiserror`: 2.0.18 → 2.0.19 (#246) - `serde_json`: 1.0.150 → 1.0.151 (#253) ### CI - Bump `lewagon/wait-on-check-action` from 1.8.1 to 1.9.0 (#250) - Bump `actions/labeler` from 6 to 7 (#251) ## [0.5.11] - 2026-07-07 ### Dependencies - `tokio`: 1.52.1 → 1.52.3 (#220) - `serde_json`: 1.0.149 → 1.0.150 (#221) - `rust-i18n`: 4.0.0 → 4.1.0 (#222) - `fsrs`: 5.2.0 → 6.6.1 (#223, #225, #230) - `ratatui`: 0.30.0 → 0.30.2 (#226, #234) - `chrono`: 0.4.44 → 0.4.45 (#227) - `tui-big-text`: 0.8.4 → 0.8.8 (#229, #233) - `regex`: 1.12.3 → 1.12.4 (#231) - `anyhow`: 1.0.102 → 1.0.103 (#236) - `rand`: 0.10.1 → 0.10.2 (#238) - `crossbeam-epoch`: 0.9.18 → 0.9.20 (transitive, fixes RUSTSEC-2026-0204) (#238) ### CI - Bump `codecov/codecov-action` from 6 to 7 (#224) - Bump `lewagon/wait-on-check-action` from 1.7.0 to 1.8.1 (#228, #237) - Bump `actions/checkout` from 6 to 7 (#232) - Bump `actions/cache` from 5 to 6 (#235) ## [0.5.10] - 2026-04-21 ### Fixed - `Excellent` performance tier (80-99%) is now reachable with all existing scenarios by lowering the threshold from 90% to 80% (#201) - PerformanceTracker (FSRS) data now persisted between sessions (#196) - `commands_executed` counter now incremented on scenario completion (#196) - Daily quests now generated on first launch (#195) - Escape key no longer counts as a game action when dismissing the hint popup (#194) - Arcade sub-mode headers now display the correct title: Survival shows `SURVIVAL MODE`, Daily Challenge shows `DAILY CHALLENGE` (#197) - Collapse nested if into match guard for clippy compliance in gamification module ### Dependencies - `rust-i18n`: 3.1.5 → 4.0.0 (#217) - `tokio`: 1.49.0 → 1.52.x (#187, #209, #216) - `rand`: 0.10.0 → 0.10.1 (#215) - `toml`: 1.0.3 → 1.1.2 (#188, #193, #207, #208) - `tui-big-text`: 0.8.2 → 0.8.4 (#205, #210) - `proptest`: 1.10.0 → 1.11.0 (#206) - `tempfile`: 3.26.0 → 3.27.0 (#189) - `tracing-subscriber`: 0.3.22 → 0.3.23 (#190) - `rodio`: 0.22.1 → 0.22.2 (#186) ### CI - Bump `codecov/codecov-action` from 5 to 6 (#203) - Bump `lewagon/wait-on-check-action` from 1.5.0 to 1.7.0 (#204, #212, #218) - Bump `softprops/action-gh-release` from 2 to 3 (#211) - Bump `actions/github-script` from 8 to 9 (#214) - Bump `dependabot/fetch-metadata` from 2 to 3 (#213) ## [0.5.9] - 2026-03-07 ### Fixed - Fix double keypress on Windows by filtering `KeyEventKind::Release` events (#182) ## [0.5.8] - 2026-02-09 ### Added - **Arrow key cursor movement** — Optional user configuration to enable arrow keys for cursor movement (#153) ### Changed - CI: Added dependabot auto-merge workflow for patch-level dependency updates - CI: Fixed codecov upload to not fail workflow on upload errors - CI: Fixed labeler workflow to use `pull_request_target` event ### Dependencies - `rand`: 0.9.2 → 0.10.0 (adapted to `RngExt` trait rename) - `anyhow`: 1.0.100 → 1.0.101 - `proptest`: 1.9.0 → 1.10.0 - `regex`: 1.12.2 → 1.12.3 - `criterion`: 0.8.1 → 0.8.2 - `tui-big-text`: 0.8.1 → 0.8.2 - `chrono`: 0.4.42 → 0.4.43 - `thiserror`: 2.0.17 → 2.0.18 - `time`: bumped to latest compatible - `bytes`: bumped to latest compatible ### Quality - **Tests**: 1857 (up from 1842) - **Clippy**: Zero warnings ## [0.5.7] - 2026-01-15 ### Added - **Category Filters Screen** — Filter scenarios by category with popup UI (#143): - Quick category selection with `f` key from scenario list - 9 categories: Movement, Editing, Selection, Clipboard, Search, Text Objects, Surround, Multi-cursor, Insert - Toggle categories with Space/Enter, navigate with j/k - **Multi-cursor Support** — Full support for Helix multi-cursor operations (#142): - `C` (copy_selection_on_next_line) and `Alt-C` (copy_selection_on_prev_line) - Multi-cursor scenarios for learning cursor multiplication - **Bracket Preview Highlight** — Visual preview for surround commands (#136): - Shows bracket type before confirming surround operation - Supports all bracket pairs: `()`, `[]`, `{}`, `<>`, quotes - **Scenario Progress Tracking** — Display current scenario number in title (#135) ### Fixed - **Search Command `*` Behavior** — Now correctly matches real Helix behavior (#150): - `*` selects current word and sets search pattern without jumping - Use `n`/`N` to navigate between matches after `*` - **Search `N` Command** — Fixed `find_prev` returning same match at cursor end (#148): - Proper backward navigation with correct match boundary handling - **Removed Invalid `#` Command** — Removed Vim-ism that doesn't exist in Helix (#146): - `#` (search_word_backward) is not a Helix command - Use `*` followed by `N` for backward word search - **Alt Modifier Key Support** — Proper handling of Alt-key combinations (#140) ### Quality - **Tests**: 1842 (up from 1626) - **Clippy**: Zero warnings ## [0.5.6] - 2026-01-10 ### Added - **Embedded Scenarios & Quests** — All 136 scenarios and 55 quests now compiled into binary: - Zero runtime file I/O for scenarios/quests - Instant startup with no file loading - Single-binary distribution (no assets folder needed) - `include_str!` macro for compile-time embedding - **Menu Position Persistence** — Scenario list remembers position when returning from training: - Selected item and scroll offset preserved - Seamless navigation between training and menu - Session-scoped memory (resets on restart) - **GitHub Auto Labeler** — Automatic PR labeling in CI: - File-path based labels (ui, helix-core, game, etc.) - Conventional commit prefix labels (feat→enhancement, fix→bug, etc.) ### Changed - **README** — Added training mode GIF demo in hero section ### Quality - **Tests**: 1626 (up from 1355) - **Coverage**: 91% (up from 86%) - **Clippy**: Zero warnings ## [0.5.5] - 2026-01-10 ### Added - **Audio Feedback System** — Sound effects for mini-game events: - Complete/Failed scenario sounds - Multiplier up, Level up, Life lost sounds - Game over and countdown sounds - Timer warning alerts - OGG Vorbis format via rodio library (CC0 licensed from Kenney.nl) - **Game Mode Selection** — Three distinct mini-game modes: - **Arcade**: Classic 60-second timed session with 3 lives - **Survival**: Endless mode with 1 life, escalating time pressure (10s → 3s per level) - **Daily Challenge**: Fixed 10 scenarios, 3 attempts per day, same for all players - **Sound Toggle** — Global sound on/off with `M` key across all screens - **Mode Selection Submenu** — Visual popup for choosing game mode when starting Arcade ### Changed - CI: Added `libasound2-dev` installation for Linux audio support ### Quality - **Tests**: 1355 (up from 1347) - **Clippy**: Zero warnings ## [0.5.4] - 2026-01-10 ### Added - **FSRS-based Arcade Mode** — Intelligent scenario selection prioritizes commands needing practice: - Overdue commands increase scenario urgency - Weak commands (low success rate) appear more often - Novel commands get moderate priority for discovery - Weighted random selection maintains variety - **Statistics Screen Improvements** — Real FSRS data integration: - Command Mastery Distribution with progress bars - Review Status showing due reviews and success rates - Commands Needing Practice section (top 5 weak commands) - Scenario Mastery distribution (Learning/Proficient/Mastered) - **Profile Screen Learning Progress** — New section showing FSRS learning metrics - **Review Session UX** — Improved review experience: - Command descriptions from registry - Session complete notifications with XP earned - "No reviews due" informative message - **Mastery Level-Up Notifications** — Visual feedback when command mastery improves - **Navigation Shortcuts** — `m` and `Esc` keys navigate back to mode selection from scenario list - **Review Shortcut** — `r` key starts review session from all main screens ### Changed - **Codebase Architecture** — Comprehensive refactoring: - Split `input/typestate.rs` (2747 → ~400 lines max per file) - Centralized test utilities in `src/testing/` module - Split simulator tests into 8 organized modules - Removed 21 dead code items ### Quality - **Tests**: 1268 (up from 1239) - **Clippy**: Zero warnings - **Coverage**: 86% ## [0.5.3] - 2026-01-09 ### Added - **Syntax highlighting for scenario code** — Rust code in scenarios now displays with full syntax highlighting using syntect - **Adaptive difficulty system** — Mini-game difficulty adjusts based on player performance metrics ### Changed - **136 scenarios with realistic Rust code** — All scenarios updated from minimal synthetic text to real, idiomatic Rust code snippets - **Paragraph commands use Helix keybindings** — Changed from Vim-style `{`/`}` to Helix-style `[p`/`]p` paragraph navigation ### Fixed - **Paragraph scenario selection visibility** — Target states now correctly show selection range for `]p`/`[p` commands - **Cursor rendering at end-of-line** — Cursor now displays correctly when positioned at the end of a line ### Quality - **Tests**: 1239+ (up from 1116) - **Clippy**: Zero warnings - **Scenarios**: 136 total (realistic Rust code content) ## [0.5.2] - 2026-01-07 ### Added - **141 new training scenarios** covering all command categories: - Movement: basic, word, line, paragraph, search, text objects - Editing: insert, delete, change, replace, case toggle, surround - Selection: expand, shrink, line selection, text object selection - Clipboard: yank, paste, registers - Advanced: macros, multiple cursors, search & replace - **Quest system** with 5 quest types: - Command practice, scenario completion, speed runs - Time invested, exploration quests ### Fixed - **Helix behavior accuracy improvements** - `~` (switch_case) now keeps cursor in place and toggles entire selection - `p`/`P` (paste) now keeps cursor on last pasted character, not after it - `i` (insert mode) now collapses selection when entering insert mode - Word movements (`w`, `b`) now correctly create selections in target state - **XP breakdown display** - Separated mastery factor and repeat penalty in results screen - Fixed misleading "Learning: -30%" display (was showing combined reduction) - **Scenario fixes** - Fixed scenario sorting to sort by difficulty first - Added missing selection fields to 13 movement scenarios - Fixed switch_case scenarios to match new cursor behavior - Fixed clipboard scenarios cursor positions ### Changed - CI: Switched to `Swatinem/rust-cache@v2` for proper target directory caching (faster builds) ### Security - Updated `lru` crate to 0.16.3 (RUSTSEC-2026-0002 soundness fix) - Added ignore for RUSTSEC-2025-0141 (bincode unmaintained, transitive dep) ## [0.5.1] - 2026-01-07 ### Changed - **Refactored to helix-core primitives** (#110) - Migrated text objects (`miw`, `maw`, `mip`, `map`) to `helix_core::textobject` - Migrated character search (`f`, `F`, `t`, `T`) to `helix_core::search` - Migrated surround helpers to `helix_core::surround::find_nth_pairs_pos` - Migrated bracket matching (`mm`) to `helix_core::match_brackets` - Migrated paragraph movement (`{`, `}`) to `helix_core::movement` - Migrated toggle comments (`Ctrl-c`) to `helix_core::comment` - Migrated split selection on newlines (`Alt-s`) to `helix_core::selection` - **Code cleanup and deduplication** (#111) - Extracted `extract_word_at_cursor` helper for search commands - Removed ~400 lines of excessive comments and documentation - Added 14 new unit tests for helper functions ### Fixed - `join_selections_space` (`Alt-J`) now correctly selects inserted space (#110) ## [0.5.0] - 2026-01-07 ### Added **Major Feature: 45+ New Commands with Typestate Input Architecture** This release significantly expands command coverage with a complete typestate-based input system for handling multi-key sequences. - **Selection Commands (12 new)** (#100) - s select_regex: Select regex matches in selection - S split_selection: Split selection on regex - Alt-s split_selection_newlines: Split on newlines - & align_selections: Align selections to columns - _ trim_selections: Trim whitespace from selections - Alt-- merge_selections: Merge all selections - Alt-_ merge_consecutive: Merge adjacent selections - C copy_selection_next_line: Copy selection down - Alt-C copy_selection_prev_line: Copy selection up - K keep_selections_matching: Keep matching selections - Alt-K remove_selections_matching: Remove matching - Ctrl-c toggle_comments: Toggle line comments - **Search Commands (6 new)** (#100) - / search_forward: Search forward with regex - ? search_backward: Search backward with regex - n search_next: Jump to next match - N search_prev: Jump to previous match - * search_word_under_cursor: Search word forward - Alt-* search_selection: Search selection text - **View Commands (6 new)** (#100) - z/zz view_center: Center view on cursor - zt view_top: Scroll cursor to top - zb view_bottom: Scroll cursor to bottom - zm view_center_horizontal: Center horizontally - zj scroll_down: Scroll view down - zk scroll_up: Scroll view up - **Movement Commands (8 new)** (#105, #106) - { goto_prev_paragraph: Jump to previous paragraph - } goto_next_paragraph: Jump to next paragraph - ^ goto_first_nonblank: Alias for gs - Ctrl-b page_up: Scroll page up - Ctrl-f page_down: Scroll page down - Ctrl-u half_page_up: Scroll half page up - Ctrl-d half_page_down: Scroll half page down - Alt-. repeat_last_motion: Repeat last f/F/t/T - **Editing Commands (3 new)** (#106) - Alt-` switch_to_uppercase: Convert to uppercase - R replace_with_yanked: Replace selection with yanked text - Alt-J join_selections_space: Join with spaces - **Selection Management (3 new)** (#106) - , keep_primary_selection: Keep only primary selection - Alt-, remove_primary_selection: Remove primary selection - Alt-x shrink_to_line_bounds: Shrink selection to line bounds - **Surround Commands (Match Mode)** (#107) - ms + char: Add surround (wrap selection with brackets/quotes) - md + char: Delete surround (remove enclosing pair) - mr + char + char: Replace surround (change pair type) - **Text Object Selection** (#108) - ma + object: Select around (includes delimiters) - mi + object: Select inside (excludes delimiters) - Supported objects: `w`, `W`, `(`, `[`, `{`, `<`, `"`, `'`, `` ` ``, `p` - **Lesson Navigation** (#103) - Next/Previous scenario navigation after completion - n to go to next lesson from Results screen - p to go to previous lesson - l to return to scenario list ### Changed - **Typestate Input Architecture** (#100, #102) - Replaced `command_buffer: String` with `InputStateMachine` - Added `InputStateAccess` trait for uniform state access - 8 pending states: `FindCharPending`, `TillCharPending`, `SurroundAddPending`, `SurroundDeletePending`, `SurroundReplacePending`, `TextObjectAroundPending`, `TextObjectInsidePending`, `ViewPending` - Type-safe state transitions at compile time - `FindState` module to track last find/till motion for repeat - **Command System** - Extended command constants for all new commands - Extended `cmd_to_key_events()` for multi-key command sequences - Unified handler pattern across all pending states ### Fixed - **Alt-, Command** (#106) - Fixed `Alt-,` to correctly call `remove_primary_selection` - Was incorrectly mapped to `repeat_last_motion_reverse` (Vim feature, not Helix) - **Empty Document Handling** (#108) - Fixed panic in `find_surrounding_pair()` when document is empty - Fixed panic in `select_around_paragraph()` / `select_inside_paragraph()` for empty documents - Added early returns with safe defaults for edge cases ### Quality - **Tests**: 1116 (was 845, +271 new tests) - **Clippy**: Zero warnings - **Commands**: 45+ new commands (total ~90 commands supported) - **Architecture**: Complete typestate input system for all multi-key sequences ## [0.4.8] - 2026-01-06 ### Added - **Code Coverage Integration** — Codecov workflow with coverage reports (#93) - **UI Screenshots** — Added visual examples to README (#88) - **Comprehensive Test Coverage** — 845 tests (up from ~760) - Handler tests: minigame.rs, scenario.rs, navigation.rs, profile.rs - Render module tests: helpers.rs, editor.rs, screen integration tests - Edge case coverage: Unicode, empty content, small/large terminals ### Changed - **Architecture Refactoring** — 5-phase cleanup for better maintainability - Phase 1: Eliminate `Rc>` from ProgressState (#91) - Phase 2: Remove GameState.session duplication (#92) - Phase 3: Standardize error handling with `UserError` (#94) - Phase 4: Introduce Game Service Layer (#95) - Phase 5: Migrate minigame handlers to HandlerContext pattern (#96) - **CI/CD Improvements** - Removed sccache, kept cargo cache for simplicity (#98) - Merged coverage.yml into main ci.yml workflow - Bumped actions: upload-artifact v6, download-artifact v7, cache v5 - Increased Miri job timeout to 90 minutes - **Documentation** - Improved README structure and content - Reformatted keybindings with `` tags - Simplified installation section (removed hardcoded version links) ### Dependencies - `tokio`: 1.48.0 → 1.49.0 - `tui-big-text`: 0.7.3 → 0.8.1 - `toml`: 0.9.8 → 0.9.10 - `tempfile`: 3.23.0 → 3.24.0 - `serde_json`: 1.0.145 → 1.0.148 - `tracing`: 0.1.43 → 0.1.44 - `criterion`: 0.8.0 → 0.8.1 ### Quality - **Tests**: 845 (was ~760, +85 new tests) - **Clippy**: Zero warnings - **Architecture**: Cleaner separation of concerns with HandlerContext pattern ## [0.4.7] - 2025-12-03 ### Changed - **Constants Module** — Extracted hardcoded values to `src/constants.rs` (#77) - Centralized timing constants (tick rate, animation delays) - UI dimension constants (key history size, popup dimensions) - Game balance constants (XP values, streak multipliers) - Improved maintainability and configurability - **Unified Command Handling** — Refactored command parsing between modes (#76) - Shared `CommandContext` trait for training and arcade modes - Eliminated code duplication in key handling - Consistent behavior across all game modes ### Fixed - **Match Mode Multi-Key Handling** — Added m prefix to multi-key commands (#75) - mm now correctly detected as partial command (was incorrectly treating m as complete) - Fixes issue where Match Mode was not accessible in certain contexts ## [0.4.6] - 2025-12-02 ### Added - **Helix-style Menu Navigation** — Navigate scenario list with vim-like commands - j/k for up/down movement - gg to jump to first item, G to jump to last - Count prefixes: 5j moves 5 items down, 10k moves 10 up - 15G or 15gg jumps directly to item 15 - **Numeric Count Prefixes for Commands** — Execute commands multiple times - 3h moves left 3 times, 5j moves down 5 times - 2w moves forward 2 words - Counts as single action for scoring (not N separate actions) ### Fixed - **Match Mode Implementation** — m now correctly enters Match Mode - mm jumps to matching bracket (was incorrectly just m) - Matches official Helix keymap documentation - **Count Prefix Scoring** — Commands like 3w now count as 1 action, not 3 - Added `record_action_with_count` method for proper scoring - **Results Screen Progression Panel** — Improved XP and stats display - Added "Your Stats" section with Level, Total XP, Scenarios, Streak - Shows earned XP from scenario (+N) next to total - Fixed data source (was reading cleared state) - **Unified Exit Keymap** — Ctrl-Q now works consistently across all screens - Menu/ModeSelection: exits application - Task/Results/Profile/Stats/Review/MiniGame: returns to previous screen ## [0.4.5] - 2025-12-02 ### Added - **Command Registry Architecture** — Type-safe O(1) command dispatch system - `CommandRegistry` with mode-specific command registration - `CommandMetadata` for rich command documentation (name, key, description, category) - `KeyTrie` for efficient multi-key command resolution (gg, ge, gh, gl, gs) - Category-based organization (Movement, Editing, Selection, Clipboard) - Compile-time mode safety via PhantomData markers ### Fixed - **Cursor display on empty lines** — Use block character (█) instead of space to prevent visual line duplication when cursor is on empty line - **Append after word movement** — Fix `append()` to handle forward selections correctly (e + a now works properly) - **Scenario corrections**: - `append_mode_001`: Fixed expected content from "hello !world" to "hello! world" - Removed non-existent G command (Helix uses ge for goto last line) - Removed duplicate `document_end_001` scenario (use `goto_last_line_001` with ge) - Updated hints to reference correct ge command instead of G ### Changed - Simplified command dispatch from O(n) string matching to O(1) registry lookup - Reduced cyclomatic complexity in command handling code - 86 scenarios (removed 1 duplicate) ## [0.4.4] - 2025-12-01 ### Added - **Notification System** — Real-time notifications for level-ups, quest completions, and achievements - Auto-dismissing popups (3 seconds) in top-right corner - Color-coded by type (yellow/magenta/green/cyan) - Queue system for multiple simultaneous notifications - **Filtering System** — Full implementation of scenario filters - Category filtering (toggle Movement, Editing, Clipboard, Advanced) - Difficulty filtering (toggle Beginner, Intermediate, Advanced) - Completion filtering (cycle: All → Completed → Not Completed) - **Learning Scheduler Improvements** — Mix new content with reviews - 50/50 split between review items and new content in practice sessions - Weak command detection (low mastery, high difficulty, many lapses) - Untried essential command suggestions - **Repeat Command Enhancement** — Full support for insert mode entry commands - Correctly replay a, A, I, o, O with proper entry point - `entry_command` field in `RepeatableAction::InsertSequence` ### Changed - **Type-Safe Handler Architecture** — Compile-time guarantees for screen handlers - `HandlerContext<'a>` struct for borrowing non-screen state - `HandlerOutcome` enum (Stay/Transition) for explicit screen changes - `extract_screen!` macro for type-safe screen data extraction - 30+ handlers refactored to use new patterns - **Unified Command Parsing** — Extracted shared logic into `CommandContext` trait - `ParsedCommand` enum (Complete/Partial/Invalid) - Single source of truth for command buffer parsing - Reduced code duplication between training and arcade modes ### Removed - 23 redundant tests (3.2% reduction, coverage maintained) - Phase/Stage/Iteration comments from documentation - Invalid dd command references (replaced with x + d pattern) ### Fixed - Unused import warnings after test cleanup - Damaged "Add" comments from bulk replacement ### Quality - **Tests**: 685 (was 708, -23 redundant) - **Clippy**: Zero warnings - **Code**: Cleaner documentation without development phase references ## [0.4.3] - 2025-12-01 ### Added - **MSRV Check** — CI now verifies build with minimum supported Rust version (1.89) - **Miri Workflow** — Scheduled weekly undefined behavior detection (Sundays) - **`#![forbid(unsafe_code)]`** — Enforced in lib.rs and main.rs ### Changed - **MSRV bumped to 1.89** — Required by dependencies (bytemuck avx512_simd) - **Float rounding** — XP calculations now use `.round()` for cross-platform consistency - **Modern Rust syntax** — Refactored to use `if let && condition` chains ### Fixed - Float-to-int conversion differences between native and Miri execution - Async tests excluded from Miri (too slow, 300+ seconds each) ## [0.4.2] - 2025-11-30 ### Added **Expanded Commands** (#52) - **14 New Commands**: Expanded from 31 to 45+ supported commands - Find/till character: f, F, t, T (jump to/before character) - Match brackets: m (jump to matching bracket) - Goto commands: gh (line start), gl (line end), gs (first non-whitespace), ge (last line) - Selection: x (select line), X (extend to line), v (select mode), ; (collapse selection) - Case switching: ~ (toggle case) - Delete selection: d (delete current selection) - **New Scenario Files**: - `find-till.toml`: f/F/t/T character search (5 scenarios) - `goto-commands.toml`: gh/gl/gs/ge navigation (4 scenarios) - `match-brackets.toml`: bracket matching (4 scenarios) - `line-selection.toml`: x/X line selection (3 scenarios) ### Changed - **Helix-correct command behavior**: - d now executes immediately as delete selection (not waiting for dd) - x selects current line only (not including next line) - Idiomatic Helix: use xd to delete line (select + delete) - **Selection visualization**: Selected text now highlighted with blue background ### Fixed - Selection not being displayed visually after selection commands - d command waiting for second d instead of executing immediately - x command selecting two lines instead of one - Selection end boundary including next line when it shouldn't ## [0.4.1] - 2025-11-30 ### Added **Expanded Content** (#51) - **Training Scenarios**: Expanded from 25 to 78 scenarios (3.1x increase) - `basic-movement.toml`: h, j, k, l character navigation (9 scenarios) - `word-basics.toml`: w, b word navigation (7 scenarios) - `line-navigation.toml`: 0, gg line/document navigation (7 scenarios) - `combined.toml`: multi-key navigation challenges (8 scenarios) - `precision.toml`: single-step precision movements (8 scenarios) - `deletion.toml`: x, dd deletion operations (8 scenarios) - `delete-advanced.toml`: advanced deletion patterns (6 scenarios) - **Daily Quests**: Expanded from 12 to 55 quest templates (4.6x increase) - Easy (14): Movement commands (h, j, k, l, w, b, 0, gg, G), editing (x, dd, yy) - Medium (23): Word navigation, insert/append modes, clipboard, undo/redo - Hard (18): Marathons, speed runs, time challenges, exploration quests ## [0.4.0] - 2025-11-30 ### 🎮 Phase 2.1: Mini-Games Mode (Arcade Training) This release introduces Mini-Games mode - an arcade-style training experience with time pressure and gamification mechanics designed to build muscle memory through fast-paced repetition. ### Added **Mini-Games Mode** (#50) - **Arcade Training Experience** - Mode selection screen (Training vs Arcade) - 60-second timed sessions with countdown - Automatic scenario progression with 2-second transitions - 5-10 second time limits per scenario based on difficulty - **Scoring & Progression** - Real-time score tracking with streak multiplier (1.0x → 5.0x) - XP awards per scenario (15 base + streak bonus) - "+X XP" notification popup during transitions - High score tracking per session - **Lives System** - Start with 3 lives - Lose life on timeout or excessive actions - Lives displayed with ❤️ indicators - Bonus life at 1000, 2500, 5000 points - **UI/UX Improvements** - Key history display (last 5 keys, big text) - Pause menu (Esc) with profile/stats navigation - Game over screen with final score and stats - Countdown animation (3... 2... 1... GO!) - **Integration** - Full XP/quest/FSRS integration - Profile and statistics accessible from pause menu - Proper navigation flow (arcade → pause → profile → arcade) **Technical Implementation**: - New `MiniGameSession` struct with state machine (Countdown → Playing → Transition → Paused → GameOver) - `MiniGameData` screen state with command buffer and key history - `ReturnDestination` enum for context-aware back navigation - Unified `render_key_history_popup` (DRY refactoring) - 82 new tests for mini-game functionality ### Changed - BackToMenu now returns to ModeSelection (main mode menu) - XP display fixed to show progress within current level (not total XP) - Refactored render functions for code reuse between training and arcade modes ### Quality - All 645 tests passing - Zero clippy warnings - Code formatted with rustfmt nightly - Security audit passed (cargo deny check) ## [0.3.0] - 2025-11-30 ### 🚀 Async Non-Blocking Architecture This release introduces a complete async architecture overhaul, making the application instantly responsive with background data loading. ### Added **Async Architecture** (#49) - Tokio async runtime with non-blocking event loop - `AsyncState` enum for type-safe loading states (Loading/Ready/Failed) - `DataLoadMessage` enum for channel-based communication - Background data loaders using `tokio::task::spawn_blocking` - Parallel loading of scenarios and profile at startup - Biased `tokio::select!` for responsive keyboard handling **New Modules**: - `src/async_state.rs` (179 lines) - Type-safe async state management - `src/data_loader.rs` (239 lines) - Background data loading functions **Quest TOML System** (#48) - Quest templates extracted to TOML files (`quests/en/daily.toml`) - `QuestLoader` with security validation and limits - `QuestTemplateRegistry` for template management - 12 quest templates across 3 difficulty levels - Strict TOML parsing with `#[serde(deny_unknown_fields)]` - Validation for IDs, versions, locales, and level ranges ### Changed **Performance Optimizations**: - Runtime limited to 2 worker threads (sufficient for TUI workload) - Instant UI display (~10-50ms to first render) - Scenarios and profile load in parallel background tasks - Keyboard events prioritized with biased select **Code Quality** (#47, #45): - Large functions split into focused helpers - Hardcoded commands replaced with constants - CI/CD improvements with cargo doc tests and benchmark checks ### Performance - **Cold start**: 50-80ms (UI displays immediately) - **Background loading**: Scenarios + profile load in parallel - **Event loop**: Non-blocking, remains responsive during all operations - **Memory overhead**: 1-2 MB for async runtime ### Quality - All 563 tests passing (9 new async tests) - Zero clippy warnings - Security audit passed (cargo deny check) - Comprehensive test coverage for `handle_data_message()` ### Security - Bounded channels (32 messages) prevent memory exhaustion - Error sanitization chain intact - No race conditions (single-threaded event loop) - Path validation layer for quest templates - All input bounded by strict limits ## [0.2.1] - 2025-11-29 ### Fixed **Esc Key Conflict** (#41) - Fixed critical conflict where Esc key was used for both abandoning scenarios and exiting Helix insert mode - Changed scenario abandonment from Esc to Ctrl+Q - Now users can properly use Esc to exit insert mode (native Helix behavior) - Updated UI instructions to show Ctrl-Q instead of Esc **FSRS Command Tracking** (#40) - Fixed Review Session being non-functional due to missing command tracking - Commands from completed scenarios now properly recorded in FSRS scheduler - First reviews are immediately available (not delayed until next day) - Review Commands menu now shows badge [N] when reviews are due ### Changed **Major Code Quality Improvements** (#41) - Refactored 6 complex functions into 20+ focused, maintainable functions - Improved code readability and testability throughout codebase **execute_command** (src/helix/simulator/commands/mod.rs): - Split 193-line function into 4 focused functions (26+9+56+95+28 lines) - Separated Insert mode and Normal mode logic - Isolated repeat command recording - Reduced cyclomatic complexity significantly **handle_task_keys** (src/main.rs): - Split 112-line function into 5 focused functions - Clear separation: special keys, Insert mode input, Normal mode mapping - Better maintainability for keyboard handling **Configuration & Learning**: - visit_toml_files: Functional style, no side effects (38 lines) - update_fsrs_state: Separated FSRS calculation from state mutation (3 functions) - generate_quests: Data-driven design with QuestDistribution struct - validate_scenario: DRY principle with reusable validators **State Handlers** (from v0.2.0, documented): - Modularized state.rs into focused handler modules - 8 handler modules: navigation, menu, scenario, gameplay, profile, quests, review, filters - Reduced main state file from 2,084 to 1,486 lines ### Performance **CI/CD Improvements**: - Added cargo registry caching (crates.io index, .crate files, git deps) - Combined with sccache: full build cache (registry + compilation) - Dependency downloads: ~10-30s faster on cache hits - Fixed sccache configuration for 88-100% cache hit rate ### Quality - All 352 tests passing - Zero clippy warnings - Code formatted with rustfmt nightly - Single Responsibility Principle applied throughout - Improved testability and maintainability ## [0.2.0] - 2025-11-28 ### 🎉 Phase 1 COMPLETE - Smart Learning System This release completes Phase 1 of the helix-trainer roadmap by implementing the Interactive Review Session UI, the final missing piece of the FSRS spaced repetition system. ### Added **Interactive Review Session UI** (#39) - Review session screen with progress tracking ("Reviewing 3/5 commands") - Command mastery display (Beginner → Intermediate → Advanced → Master) - Next review date indicator based on FSRS scheduling - Simple MVP interaction: s (success), f (failed), Esc (abandon) - Menu integration with yellow badge `[N]` showing count of due reviews - XP rewards system: - Base: 10 XP per command reviewed - Success rate bonus: 0-20 XP (Example: 5 reviews at 80% = 66 XP total) - Keyboard shortcuts: Press r from menu to start review session **Technical Implementation**: - New `Screen::Review` state and `ReviewSessionState` structure - Review screen rendering module (`src/ui/render/review.rs`) - Message handlers for review session workflow - Event handling for review interactions - 33 comprehensive tests (3 unit tests passing, 30 integration tests documented) ### Performance All performance targets exceeded: - **Rendering**: 0.5ms per frame (60+ FPS, 32x faster than 16ms target) - **Memory**: 440 bytes review state (56% of 1KB budget) - **State updates**: O(1) complexity - **Event handling**: <0.1ms (10x faster than 1ms target) ### Security - **Security Rating**: A+ (rust-security-maintenance audit) - Zero unsafe blocks - All input validated through safe Rust enums - Bounds checking on all array access - Tamper-proof XP calculations - Zero vulnerabilities found ### Quality - All 352 library tests passing - Zero clippy warnings (`clippy --all-targets --all-features -- -D warnings`) - Code review approved by rust-code-reviewer agent - Performance reviewed by rust-performance-engineer agent - Security audited by rust-security-maintenance agent ### Changed - Updated README to highlight Phase 1 completion - Reorganized features section to emphasize Smart Learning System - Menu now shows "Review Commands (r)" with due count badge ### Phase 1 Status: 100% Complete ✅ With this release, all Phase 1 components are fully implemented: - ✅ FSRS spaced repetition backend - ✅ Interactive review sessions (NEW in this release) - ✅ Daily quest system - ✅ XP/leveling progression - ✅ Profile & Statistics screens - ✅ Scenario mastery tracking - ✅ Anti-farming protection ## [0.1.5] - 2025-11-28 ### Added **Phase B: Profile & Statistics Menu Integration** - Main menu integration for Profile and Statistics screens - Added "View Profile (p)" menu item with keyboard shortcut - Added "Statistics (s)" menu item with keyboard shortcut - Profile and Statistics now accessible from main menu with arrow navigation - Visual separator grouping system options (Profile, Statistics, Quit) - Keyboard hints displayed in menu items - Enhanced navigation - Press p for instant Profile screen access (1-keypress shortcut) - Press s for instant Statistics screen access (1-keypress shortcut) - Arrow keys / j/k navigation through all menu items - Number keys (1-9) still work for scenario shortcuts ### Changed - Menu structure: Scenarios → Separator → Profile → Statistics → Quit - Updated menu navigation logic to support +3 items (Profile, Statistics, Quit) - Quit option moved to bottom after Profile and Statistics ### Fixed - Profile and Statistics screens now discoverable (previously only accessible from results screen) - Menu scrolling works correctly with new items ## [0.1.4] - 2025-11-28 ### Added **Phase 1.5: Scenario Metadata & Filtering System** - Rich scenario metadata system - `ScenarioMetadata` with category, difficulty, tags, and taught commands - 25 scenarios fully categorized: Movement (5), Editing (11), Clipboard (3), Advanced (6) - Difficulty levels: Beginner (20), Intermediate (5) - Each scenario tagged with taught commands and practice focus areas - Flexible filtering and sorting system - `ScenarioCollection` with six sort modes (alphabetical, difficulty, category, completion, recent, random) - Filter by category (Movement, Editing, Clipboard, Advanced) - Filter by difficulty (Beginner, Intermediate, Advanced) - Filter by taught commands (e.g., show all scenarios teaching w or dd) - Filter by completion status (completed vs. uncompleted) - Chainable filters for complex queries - 100% backward compatible with existing scenarios (metadata optional) - Enhanced UI indicators - Difficulty badges: 🟢 Beginner / 🟡 Intermediate / 🔴 Advanced - Completion status: ✅ for completed scenarios - Visual feedback in scenario menu - Automated scenario validation tests - `test_all_scenarios_load_successfully`: validates all 25 scenarios load without errors - `test_all_scenarios_execute_solution`: executes solution commands and verifies target state - Catches cursor position errors, invalid command formats, and other issues - Runs during CI to prevent scenario regressions - Performance benchmarks - Criterion benchmarks in `benches/filtering_sorting.rs` - <1ms filtering/sorting for collections of 1000 scenarios - Memory-efficient metadata storage ### Changed - Integrated `ScenarioCollection` into `AppState` (replacing raw `Vec`) - Menu now displays difficulty and completion indicators for each scenario - Updated all 25 scenarios with complete metadata (category, difficulty, tags, taught commands) ### Fixed - Corrected cursor positions in multiple scenarios: - `repeat_insert_001`: Fixed target cursor [1, 17] → [1, 16] - `paste_before_001`: Fixed target cursor [0, 1] → [0, 2] - `delete_line_001`: Start cursor on line 1 instead of line 0 - `document_end_001`: Cursor at [4, 9] (end of document) - `select_word_001`: Cursor at [0, 9] (after word end) - `repeat_indent_001`: Cursor [2, 2] → [2, 4] (after second indent) - Fixed command format in scenarios: - Changed multi-key commands from arrays to strings (e.g., `["d", "d"]` → `["dd"]`) - Applies to: dd, gg, r_, and other multi-key sequences - Fixed repeat command repeatability: - Made all printable ASCII characters and space repeatable in `is_repeatable_command()` - Allows replace commands like r_ to work with repeat (.) - Fixed indentation in `repeat_indent_001`: - Changed from 4-space to 2-space indentation to match simulator behavior - Fixed append mode behavior in `append_mode_001`: - Adjusted target content to match actual e command behavior (cursor after word, not on last char) ### Performance - Filtering 1000 scenarios: ~50-200 µs (well under 1ms budget) - Sorting 1000 scenarios: ~100-400 µs depending on sort mode - Zero overhead for scenarios without metadata (backward compatible) ### Security - Added `walkdir = "2.5"` dev-dependency for safe directory traversal in tests - All scenario validation tests run with bounds checking ### Tests - Added 16 comprehensive unit tests for `ScenarioCollection` - Added 2 integration tests for scenario validation - Total test count: 392 (all passing) - Zero clippy warnings ## [0.1.3] - 2025-11-28 ### Fixed - **Hint system completely non-functional**: Hints were stored in wrong TOML section and never loaded - Moved `hints` arrays from `[scenarios.solution]` to `[[scenarios]]` level in all 11 scenario files - Fixed 24 scenarios containing 55 total hints - Hints now properly deserialize and display when requested - **Hint key conflict**: UI showed `[h: Show Hint]` but h is Helix left movement command - Added ? as primary hint key (intuitive, no conflicts) - Kept F1 as alternative for accessibility - Handles both `Char('?')` and `Char('/')` + Shift for cross-platform support - Updated UI to show `[?: Hint | F1]` ### Added - **Hint toggle behavior**: Press ? to open hint, press again to close (improved UX) - **Cross-platform hint key support**: Properly handles different keyboard layouts and modifier keys ## [0.1.2] - 2025-11-28 ### Fixed - Indent/dedent commands (>, <) not working in TUI (#35) ## [0.1.1] - 2025-11-28 ### Added - Scenario mastery tracking system to prevent XP farming - Three-tier mastery levels: Learning → Proficient → Mastered - Graduated XP scaling: 100% → 50% → 20% - Session spam protection (same-day repeat penalties: 100% → 70% → 30%) - Prevents farming by reducing XP for mastered scenarios by 80% - New module: `src/learning/scenario_history.rs` (600+ lines) - 23 comprehensive tests for mastery tracking - Bounded scenario tracking (MAX_SCENARIOS_TRACKED = 10,000) - Prevents unbounded memory growth - Defense in depth against DoS attacks - Scenario ID validation at storage boundary - Validates alphanumeric + underscore + hyphen only - MAX_SCENARIO_ID_LENGTH = 100 characters - Blocks path traversal and injection attempts - Performance benchmarks and profiling - Criterion benchmarks: `benches/xp_scaling.rs` - DHAT memory profiling: `examples/memory_profile.rs` ### Changed - Replaced `String` dates with `chrono::NaiveDate` for type safety - Consistent `.round()` usage in XP calculations (prevents truncation) - Mastery level displayed in results screen with emoji indicators ### Fixed - Floating-point precision issues in XP calculations - Potential memory exhaustion from unbounded HashMap growth ### Performance - XP calculation overhead: 260-460 ns (2000x under 1ms budget) - Memory per scenario: ~288 bytes - Profile serialization: ~40 µs for 100 scenarios ### Security - Added MAX_SCENARIOS_TRACKED limit (defense in depth) - Added scenario ID validation (alphanumeric + `_` + `-` only) - Type-safe date handling with NaiveDate - All arithmetic uses saturating operations ## [0.1.0] - 2025-11-28 ### Added **Phase 1: Smart Learning & Gamification System** - FSRS-based spaced repetition learning system for scientifically-optimized practice - Card state management (New, Learning, Review, Relearning) - Performance tracking per scenario (Again, Hard, Good, Easy ratings) - Intelligent review scheduling (20-30% fewer reviews than traditional methods) - Review analytics and statistics - Persistent storage in `~/.config/helix-trainer/learning.json` - Daily quests gamification system with Duolingo-style mechanics - Three quest types: Practice (3 scenarios), Learning (2 new), Review (5 cards) - Daily quest rotation at midnight local time - Streak tracking with loss aversion mechanics - Quest completion rewards (XP bonuses) - Persistent storage in `~/.config/helix-trainer/quests.json` - XP and leveling progression system - Experience points for scenario completion - Performance-based XP multipliers (1.0x to 2.0x) - Quest completion bonuses (50-150 XP) - Level progression with exponential scaling - Profile screen with detailed statistics - User profile and statistics tracking - Total scenarios completed - Average performance score - Current streak and longest streak - Total XP and current level - Review history and analytics - Persistent storage in `~/.config/helix-trainer/profile.json` - Enhanced UI screens - Profile screen with level, XP, and statistics - Statistics screen with review calendar and performance graphs - Quest tracker in main menu - XP breakdown in results screen - Success animations with XP rewards **Phase A: Foundation (Complete)** - Core TUI framework with ratatui 0.29 - Main menu with scenario selection - Task screen with editor simulation - Results screen with performance rating - Keyboard-driven navigation (Vim-style) - Helix simulator using official helix-core library (v25.07.1) - 30+ commands: h,j,k,l,w,b,e,0,$,x,dd,i,a,I,A,o,O,r,c,y,p,P,u,U,gg,G,J,>,< - Repeat command (.) for efficient editing workflows - Insert mode with text input, Backspace, arrow keys - Multi-key command buffer (dd, gg) - Yank/paste clipboard support - Automatic completion detection - Cursor and selection visualization - Beautiful UI components - Large key history display (tui-big-text, 8-line tall characters) - Success popup with 1.5s delay - Diff highlighting (red/green) in results - Action count indicators - Performance rating with emoji (Perfect/Excellent/Good/Fair/Poor) - Hint system (F1 key) - TOML scenario system with security validation - 20 training scenarios (basic to intermediate) - Configurable setup, target, solution, hints - Performance scoring (optimal count, max points, tolerance) - Input validation and sanitization - Path traversal prevention - Content size limits - Testing and quality infrastructure - 164 passing tests (unit, integration, property-based) - Zero clippy warnings policy - cargo-nextest for fast test execution - Proptest for property-based testing - 100% test coverage for core modules - Cross-platform CI/CD pipeline - GitHub Actions workflows for Linux, macOS, Windows - Automated testing with cargo-nextest - Rustfmt (nightly) formatting checks - Clippy lints with -D warnings - Security audit with cargo-deny - Rust 2024 edition support - MSRV: 1.85 - Internationalization (i18n) support - rust-i18n integration for multi-language support - English locale (default) - Infrastructure for future language additions - Build optimization - sccache integration for fast incremental builds - Cargo cache optimization - 5x faster rebuilds (10s vs 54s) - Release automation - Cross-platform binary builds (9 platforms) - Linux x86_64 (GNU and musl) - Linux ARM64 (aarch64 GNU and musl) - macOS x86_64 (Intel) - macOS ARM64 (Apple Silicon M1/M2/M3) - Windows x86_64 - Windows ARM64 - Automatic GitHub releases on tags - Changelog generation and extraction - SHA256 checksums for all binaries - Documentation improvements - Problem-solution framing in README - Quick Links navigation section - Consolidated Features section - Code examples with real output - CONTRIBUTING.md extraction - CI status badge - Visual TUI example ### Changed - Upgraded to Rust 2024 edition (latest stable) - Migrated to helix-core 25.07.1 (from 24.07) - Optimized dependencies (removed tokio, unnecessary features) - Refactored codebase into 31 modular files - Enhanced error messages with context and suggestions - Improved scoring algorithm for better feedback ### Fixed - Replace command cursor initialization bugs - Multi-key command handling edge cases - Insert mode arrow key navigation - Yank/paste clipboard state management - Undo/redo transaction handling ### Security - All input validation with bounds checking - Path traversal prevention in scenario loading - Content size limits (1MB scenarios, 100KB files) - Safe arithmetic with checked operations - No unsafe blocks in codebase - Dependency security audits with cargo-deny ## [0.0.1] - 2024-10-01 ### Added - Initial project structure - Basic TUI skeleton with ratatui - Prototype scenario loader - Proof of concept demo --- [Unreleased]: https://github.com/bug-ops/helix-trainer/compare/v0.5.12...HEAD [0.5.12]: https://github.com/bug-ops/helix-trainer/compare/v0.5.11...v0.5.12 [0.5.11]: https://github.com/bug-ops/helix-trainer/compare/v0.5.10...v0.5.11 [0.5.10]: https://github.com/bug-ops/helix-trainer/compare/v0.5.9...v0.5.10 [0.5.9]: https://github.com/bug-ops/helix-trainer/compare/v0.5.8...v0.5.9 [0.5.8]: https://github.com/bug-ops/helix-trainer/compare/v0.5.7...v0.5.8 [0.5.7]: https://github.com/bug-ops/helix-trainer/compare/v0.5.6...v0.5.7 [0.5.6]: https://github.com/bug-ops/helix-trainer/compare/v0.5.5...v0.5.6 [0.5.5]: https://github.com/bug-ops/helix-trainer/compare/v0.5.4...v0.5.5 [0.5.4]: https://github.com/bug-ops/helix-trainer/compare/v0.5.3...v0.5.4 [0.5.3]: https://github.com/bug-ops/helix-trainer/compare/v0.5.2...v0.5.3 [0.5.2]: https://github.com/bug-ops/helix-trainer/compare/v0.5.1...v0.5.2 [0.5.1]: https://github.com/bug-ops/helix-trainer/compare/v0.5.0...v0.5.1 [0.5.0]: https://github.com/bug-ops/helix-trainer/compare/v0.4.8...v0.5.0 [0.4.8]: https://github.com/bug-ops/helix-trainer/compare/v0.4.7...v0.4.8 [0.4.7]: https://github.com/bug-ops/helix-trainer/compare/v0.4.6...v0.4.7 [0.4.6]: https://github.com/bug-ops/helix-trainer/compare/v0.4.5...v0.4.6 [0.4.5]: https://github.com/bug-ops/helix-trainer/compare/v0.4.4...v0.4.5 [0.4.4]: https://github.com/bug-ops/helix-trainer/compare/v0.4.3...v0.4.4 [0.4.3]: https://github.com/bug-ops/helix-trainer/compare/v0.4.2...v0.4.3 [0.4.2]: https://github.com/bug-ops/helix-trainer/compare/v0.4.1...v0.4.2 [0.4.1]: https://github.com/bug-ops/helix-trainer/compare/v0.4.0...v0.4.1 [0.4.0]: https://github.com/bug-ops/helix-trainer/compare/v0.3.0...v0.4.0 [0.3.0]: https://github.com/bug-ops/helix-trainer/compare/v0.2.1...v0.3.0 [0.2.1]: https://github.com/bug-ops/helix-trainer/compare/v0.2.0...v0.2.1 [0.2.0]: https://github.com/bug-ops/helix-trainer/compare/v0.1.5...v0.2.0 [0.1.5]: https://github.com/bug-ops/helix-trainer/compare/v0.1.4...v0.1.5 [0.1.4]: https://github.com/bug-ops/helix-trainer/compare/v0.1.3...v0.1.4 [0.1.3]: https://github.com/bug-ops/helix-trainer/compare/v0.1.2...v0.1.3 [0.1.2]: https://github.com/bug-ops/helix-trainer/compare/v0.1.1...v0.1.2 [0.1.1]: https://github.com/bug-ops/helix-trainer/compare/v0.1.0...v0.1.1 [0.1.0]: https://github.com/bug-ops/helix-trainer/releases/tag/v0.1.0 [0.0.1]: https://github.com/bug-ops/helix-trainer/releases/tag/v0.0.1