-
Notifications
You must be signed in to change notification settings - Fork 3
Optimize terminal UI space #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
- Remove space after 'unix:' in kitty socket paths (unix:{SOCKET_PATH})
- Fix missing quote in vim command generation
- Resolves 'Error: /tmp/mykitty is not a known subcommand for @' issue
- Add test_clipboard.py with full coverage of clipboard set/get operations - Include validation tests for error handling and edge cases - Test roundtrip functionality and chomp method behavior - Mock subprocess calls and stdin to avoid test environment issues
- Add comprehensive type hints and docstrings to search_actions.py - Reorganize methods by importance (run_key moved to top as primary function) - Fix line length violations and formatting issues across multiple files - Enhance readability with better string formatting and documentation - Refactor kitty command building to avoid f-string backslash issues - Add noqa comments for legitimate URL formatting exceptions - Maintain backward compatibility while improving maintainability All tests pass and linting issues resolved.
- Improve string formatting consistency in install_dependencies.py and kitty_for_search_ui.py - Use consistent quote styles in search_actions.py f-strings - Remove unnecessary shortcut parameter from EntryExecuted call - Enhance code readability with better line breaks and formatting - Add noqa comment for legitimate f-string comma formatting All changes maintain backward compatibility while improving code style.
- Implement dynamic sizing based on terminal width for better space utilization - Enlarge key display area by 7 characters for better entry identification - Add URL optimization by removing http/https prefixes to save space - Make UI responsive to terminal resizing with automatic recalculation - Maintain backward compatibility while improving visual layout Key changes: - Dynamic key/content size allocation (40%/60% ratio with adjustments) - Smart URL sanitization for space efficiency - Enhanced readability with larger key display area - Responsive design that adapts to different terminal sizes
- Create test_share_entry.py with 3 focused tests covering critical scenarios - Test module accessibility via 'python -m python_search.share_entry' command - Validate clipboard functionality with proper mocking and error handling - Ensure robust exception handling for non-existent entries Key test coverage: - Module installation and CLI accessibility verification - Happy path: entry content copying to clipboard with notifications - Error path: clear exceptions for missing entries to prevent silent failures These tests ensure the terminal UI's copy-to-clipboard feature works reliably and fails gracefully when issues occur.
- Update .flake8 max-line-length from 88 to 120 characters - Update .pre-commit-config.yaml flake8 and black args for 120 char lines - Add [tool.black] section in pyproject.toml with line-length = 120 - Add share_entry script entry point to pyproject.toml - Update Agents.md with CLI interaction preferences This change allows for more readable code with longer lines while maintaining reasonable formatting standards. The 120 character limit is a good balance between readability and modern wide screen displays.
Remove redundant args from pre-commit config to let flake8 use the .flake8 configuration file instead, which prevents configuration conflicts.
- Calculate optimal rows based on terminal height minus reserved lines - Ensure minimum 3 rows for content display - Handle small terminals (height <= 10) with additional space reduction - Maintain maximum 9 rows for larger displays while being more responsive to terminal size
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.
No description provided.