shell-operator icon indicating copy to clipboard operation
shell-operator copied to clipboard

feat: refactor filter

Open timmilesdw opened this issue 2 months ago • 0 comments

Overview

Major refactoring of the shell-operator filter system: replaced complex interface-based architecture with simplified functional approach, consolidated jq filtering logic, and added comprehensive test coverage.

What this PR does / why we need it

Key Changes:

  • 🔄 Architecture Overhaul: Replaced Filter interface with functional Run() API
  • 📁 Consolidation: Removed pkg/filter/jq/ subdirectory, merged logic into main package
  • 🎯 API Simplification: Single function with clear precedence (custom filter > JQ expression > no filter)
  • ✅ Enhanced Testing: Added 614 lines of comprehensive unit tests
  • 🔧 Integration: Updated 15+ files across codebase for new API

Benefits:

  • Simplified architecture and maintenance
  • Clear filter precedence rules
  • Consolidated codebase
  • 100% backward compatibility maintained
  • All tests pass with no performance regression

Special notes for your reviewer

Internal refactoring only - no breaking changes for external consumers. Major code simplification while preserving all existing functionality.

timmilesdw avatar Oct 08 '25 12:10 timmilesdw