-
Notifications
You must be signed in to change notification settings - Fork 0
feat: implement Phase 8 - Simplified Filters #2
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
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
…e 8 as Simplified Filters
- Add SimpleFiltersState interface with reasoning, toolCall, openWeights - Add DEFAULT_SIMPLE_FILTERS constant - Add hasActiveFilters helper function - Export filter types from types/index.ts - Add JSDoc comments for all public APIs
- Add SimplifiedFilters component with 3 inline checkbox toggles - Implement reasoning, tool calling, and open weights filters - Add full accessibility support (fieldset, legend, id, htmlFor, ARIA labels) - Add key parameter validation in handleFilterChange - Remove console.warn (clean code) - Create barrel export in index.ts
- Add filter params to Zod schema (reasoning, toolCall, openWeights) - Use z.preprocess() to handle boolean parsing correctly - Add filters state initialization from URL params - Add useEffect to sync filters to URL with loop prevention - Update loaderDeps and loader to pass filter params - Integrate SimplifiedFilters component in UI - Add all filters to TanStack Query queryKey - Pass filters to getModels server function - Add search dependency to all useEffect hooks
- Verify filters passed to getModels server function - Confirm applyFilters logic handles all 3 filters correctly - Ensure TanStack Table uses manualFiltering: true - Verify filters included in queryKey for proper caching - Test combined filters (AND logic for intersection)
- Add QA report for Phase 8.1 and 8.2 (types and component) - Add QA report for Phase 8.3 (URL state management) - Add comprehensive Phase 8 QA report (all sub-phases) - Document all test results (27 total tests, all PASS) - Document Zod schema bug fix and verification - Document filter behavior with test data - Provide recommendations for Phase 9
- Install husky and lint-staged packages - Initialize Husky git hooks - Add prepare script to package.json - Configure lint-staged for TypeScript, JS, JSON, MD, YAML files - Create pre-commit hook to run lint-staged - Add GitHub Actions CI workflow - Add environment variables template (.env.example) - Add comprehensive CI/CD setup guide
- Remove lint-staged from devDependencies - Keep only root-level lint-staged configuration
- Create test implementation plan for all features - Audit all implemented features (Phases 1-8) - Identify test coverage gaps (currently ~15%) - Create prioritized test plan with timeline - Map Phase 7 (Column Visibility) implementation - Provide test templates and examples - 5-week implementation schedule - Coverage target: 80% overall
TESTING SETUP: - Add vitest.config.ts with jsdom and coverage (80% thresholds) - Create tests/ directory structure (setup, utils, fixtures, unit, components, integration, e2e) - Add global test setup with Testing Library matchers - Add test helpers (renderWithProviders, createMockQueryClient) - Add filter fixtures (FILTER_FIXTURES, createFilterState) - Add unit tests for hasActiveFilters (26 tests, 150 lines) - Add component tests for SimplifiedFilters (22 tests, 250 lines) DOCUMENTATION: - Add comprehensive testing guide (docs/testing-guide.md, 500 lines) - Add test implementation plan (docs/test-implementation-plan.md, 1,621 lines) - Add CI/CD setup guide (docs/ci-cd-setup.md, 614 lines) - Update implementation-phases.md (mark Phase 8 as completed, 73% progress) CI/CD: - Install Husky and lint-staged - Initialize Husky git hooks - Add prepare script to package.json - Add lint-staged configuration for TypeScript, JS, JSON, MD, YAML files - Create pre-commit hook to run lint-staged - Add .env.example template (58 lines) - Add GitHub Actions CI workflow (.github/workflows/ci.yml, 146 lines) FIXES: - Fix all lint errors in test files (import order, method signatures) - Remove duplicate lint-staged from devDependencies - Fix TypeScript method signature style in tests/setup.ts COVERAGE: - Set coverage thresholds: 80% (lines, functions, branches, statements) - Exclude: node_modules, dist, .git, demo routes, types - Total test code: ~1,200 lines
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.
Summary
Implements Phase 8: Simplified Filters feature with 3 quick toggle filters for AI models explorer. This replaces the original full filter panel with a simplified approach for 80% of use cases with 33% of effort.
Changes
Phase 8.1: Filter Type Definitions ✅
SimpleFiltersStateinterface with 3 boolean propertiesDEFAULT_SIMPLE_FILTERSconstanthasActiveFiltershelper functionPhase 8.2: SimplifiedFilters Component ✅
Phase 8.3: URL State Management ✅
z.preprocess()for correct boolean parsingPhase 8.4: Server-Side Filtering ✅
manualFiltering: truePhase 8.5: Comprehensive QA Testing ✅
Test Results
Key Features
Filter Examples
Breaking Changes
None
Commits
QA Reports
Related Issues
Closes # (if applicable)
Related to Phase 8 in implementation plan
Checklist