Improve error correction and modernize packaging#2
Open
KrAsH-CoD3 wants to merge 6 commits intoLax3n:masterfrom
Open
Improve error correction and modernize packaging#2KrAsH-CoD3 wants to merge 6 commits intoLax3n:masterfrom
KrAsH-CoD3 wants to merge 6 commits intoLax3n:masterfrom
Conversation
Replace two-mode system with unified monitoring that catches errors at word boundaries, prevents backspace loops, and uses drift detection for more realistic human typing behavior.
- Replaced full-block screen refreshes with character-by-character updates - Implemented real backspace simulation using '\b \b' - Added multi-line cursor management for backspacing across line breaks - Greatly improved visual fidelity by eliminating terminal flicker
…d delete setup.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Major refactor of the typing simulation engine with improved error detection, modern Python packaging, and enhanced code quality.
What's New
Smarter Error Correction
Word Boundary Checking
Automatically catches errors when typing spaces or punctuation marks.
Impact: Prevents multiple errors from accumulating across words.
Backspace Locking
Once error correction starts, it completes before resuming typing.
Impact: No more inefficient back-and-forth between typing and deleting.
Originally posted by @KrAsH-CoD3 in #1
Drift Detection
Progressive error detection based on distance from the mistake.
Impact: Realistic behavior - you notice when something "feels wrong" after a few characters.
Unified Monitoring
Replaced two-mode system (typing/review) with continuous error detection.
Impact: Cleaner code, better state management, errors caught throughout.
🔧 Code Quality Improvements
setup.pytopyproject.tomlExample
Before
After
Technical Details
Error Detection Hierarchy
The system checks for errors in this order:
Architecture
Files Changed
typer.py- Core algorithm refactorpyproject.toml- New packaging config (added)setup.py- Removed (deprecated)simulation.py- Fixed terminal output