fix: resolve kernel singleton issues and implement 'j' command direct…#27
Merged
Merged
Conversation
Contributor
|
Nice idea man, we gotta fix some issues before we go any further. I'll do the same |
Collaborator
|
Well done |
exlier
added a commit
to exlier/TruShell
that referenced
this pull request
Jun 6, 2026
Process Management (Issue TruFoundation#11): - Wrapped _run_external_command polling loop in try/finally block - Ensures process.wait() is called in finally block to prevent zombie processes - Gracefully handles psutil exceptions without losing process cleanup UI/UX Improvements (Issues TruFoundation#12, TruFoundation#13): - Fixed argv mutation in app_with_lower() - now creates sys.argv.copy() instead of mutating global - Fixed Windows emoji crash in _prompt_command() - added try/except for UnicodeEncodeError - Fallback to plain ASCII 'trushell> ' prompt when UTF-8 emojis fail on limited terminals Readline & History Support (Issue TruFoundation#22): - Added prompt_toolkit>=3.0.0 to dependencies in pyproject.toml - Replaced input() with toolkit_prompt() in _prompt_command() - Enables command history and tab completion on all platforms Settings Data Integrity (Issue TruFoundation#15): - Implemented dirty_settings dict to track all setting changes - Added watch_value() handlers on Input/Select/Switch widgets - _save_settings() now safely persists all changes without querying unmounted widgets - Prevents data loss when switching categories without saving Help System Enhancements (Issues TruFoundation#25, TruFoundation#27): - run_help() now accepts command name argument - Shows specific command docstrings when 'help <command>' is used - Fixed typo in help text: 'showtask' → 'showtasks' - Updated help message to indicate 'help <command>' is now available
AkshajSinghal
added a commit
that referenced
this pull request
Jun 6, 2026
* fix: resolve critical windows compatibility and core stability issues * testcommit * fix: resolve infinite recursion in database initialization and implement security hardening Database Layer (Issue #24): - Refactored _ensure_initialized() to use direct sqlite3.connect() instead of get_db_connection() - Added global _INITIALIZED flag to prevent redundant table creation - Separated _get_db_path() function to avoid circular dependencies - Resolves RecursionError during shell startup or first DB access OS Passthrough Security (Issue #19): - Added 'import shlex' for safe command parsing - Replaced subprocess.run(shell=True) with subprocess.run(shlex.split(), shell=False) - Added validation to block pipes (|) and redirects (>, <) before execution - Prevents shell injection vulnerabilities Plugin System (Issue #10): - Added @classmethod reset() to PluginManager for singleton reset during testing - Created tests/conftest.py with autouse fixture for proper test isolation Configuration Cleanup (Issue #6): - Removed broken theme_engine plugin reference from plugins.md (path doesn't exist) * polish: improve UI, fix process management, and enhance help system Process Management (Issue #11): - Wrapped _run_external_command polling loop in try/finally block - Ensures process.wait() is called in finally block to prevent zombie processes - Gracefully handles psutil exceptions without losing process cleanup UI/UX Improvements (Issues #12, #13): - Fixed argv mutation in app_with_lower() - now creates sys.argv.copy() instead of mutating global - Fixed Windows emoji crash in _prompt_command() - added try/except for UnicodeEncodeError - Fallback to plain ASCII 'trushell> ' prompt when UTF-8 emojis fail on limited terminals Readline & History Support (Issue #22): - Added prompt_toolkit>=3.0.0 to dependencies in pyproject.toml - Replaced input() with toolkit_prompt() in _prompt_command() - Enables command history and tab completion on all platforms Settings Data Integrity (Issue #15): - Implemented dirty_settings dict to track all setting changes - Added watch_value() handlers on Input/Select/Switch widgets - _save_settings() now safely persists all changes without querying unmounted widgets - Prevents data loss when switching categories without saving Help System Enhancements (Issues #25, #27): - run_help() now accepts command name argument - Shows specific command docstrings when 'help <command>' is used - Fixed typo in help text: 'showtask' → 'showtasks' - Updated help message to indicate 'help <command>' is now available --------- Co-authored-by: Akshaj Singhal <85437940+AkshajSinghal@users.noreply.github.com>
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.
Resolves issues with 'j' command printing raw sentinel strings and failing to navigate.