This document tracks remaining improvements and future enhancements for Refocus Shell. Items are organized by priority and category.
-
Full code sanity check needed - Hidden gems and inconsistencies throughout codebase
- Review all scripts for consistency and best practices
- Identify and fix any remaining edge cases
- Standardize error handling patterns
-
Concern separation needed - Prevent "spahettification" of the project
- Some commands still mix UI, business logic, and data access
- Extract common patterns into reusable functions
- Improve modularity between commands and libraries
-
Code reuse opportunities - Some code can be elegantly refactored for reuse
- Consolidate duplicate validation logic
- Extract common database operations
- Standardize output formatting functions
- Prompt update mechanism - Current implementation has limitations
focus statusshould include time elapsed on current session- Need better prompt integration (study how virtualenv does it)
- Current solutions have major pitfalls:
alias work='. $(work)'- kills bash session on uncatched -e- Subterminal approach - "flight-engineering-grade solution"
- Moving to work function - requires major reengineering
-
Input validation enhancement - Robust validation for all user inputs
- Better handling of malformed data
- Sanitization of project names and timestamps
- Edge case handling for duration parsing
- Improved error messages with actionable suggestions
-
Project name collision handling - Enhanced duplicate project name management
- Current state: Basic continuation exists (
focus onwithout project name continues last session) - Enhancement needed: Explicit collision detection when starting new session with existing project name
- Should ask user whether to resume existing project or start new one
- Need validation to prevent database collisions
- Current state: Basic continuation exists (
-
Unit tests - Test individual subcommands and library functions
- Test
focus-db.sh,focus-utils.shlibraries - Automated test suite with test framework
- Mock database for isolated testing
- Test error conditions and edge cases
- Test
-
Integration tests - Full workflow testing
- Complete workflow:
focus on→focus status→focus off→focus report - Database state validation
- Cross-subcommand interactions
- End-to-end user scenarios
- Test pause/resume functionality
- Complete workflow:
- API documentation - Document libraries and functions
- Developer guide for contributors
- Code comments and inline documentation
- Function parameter documentation
- Database schema documentation
-
Enhanced error recovery - Better error messages and recovery suggestions
- Provide actionable steps when commands fail
- Suggest common solutions for frequent issues
- Improve error context and debugging information
-
Interactive mode for complex operations - User-friendly interfaces
- Guided setup for complex configurations
- Interactive project management
- Step-by-step workflows for new users
-
Auto-completion for shell integration - Improved shell experience
- Bash completion for project names
- Tab completion for command options
- Smart suggestions based on history
-
Automatic idle detection - Stop tracking when device is idle
- Privacy-safe, cross-distro compatible, opt-in
- Support for KDE/Plasma, GNOME, X11, systemd-logind
- Configurable idle thresholds
-
Plugin system - Allow custom subcommands via plugin directory
- Hook system for events (session start/end)
- Extensible architecture
- Plugin management commands
-
Backup & sync - Automatic database backups
- Cloud sync capabilities (Google Drive, Dropbox)
- Data migration tools
- Backup rotation and cleanup
- Time tracking templates - Predefined session templates
- Project hierarchies and tags - Better project organization
- External tool integration - Jira, GitHub integration
- Web dashboard - Visualization interface
-
Performance optimization - Database query optimization
- Caching for frequently accessed data
- Batch operations for large datasets
- Memory usage optimization
-
Enhanced user experience
- Progress indicators for long operations
- Better error recovery suggestions
- Improved reporting and analytics
- High: Items 1-9 (code quality, testing, documentation)
- Medium: Items 10-12 (user experience improvements)
- Future: Items 13-21 (advanced features)
- Each phase should include comprehensive testing
- Backward compatibility must be maintained
- User workflows should be validated
- All new features must be documented
- Examples should be provided for complex operations
- Breaking changes must be clearly communicated
- 🔧 High - Important for code quality and testing
- 🚀 Medium - Feature enhancements
- 🔮 Future - Long-term roadmap
Last updated: 2025-09-26 Total items: 21 High priority: 9 Medium priority: 3 Future items: 9