refactor: modular route organization (Phase 1-2 complete)

- Split monolithic build route handler into focused modules
- Extract validation, multi-copy, include/exclude, themes, and partner routes
- Add response utilities and telemetry decorators
- Create route pattern documentation
- Fix multi-copy detection bug (tag key mismatch)
- Improve code maintainability and testability

Roadmap 9 M1 Phase 1-2
This commit is contained in:
matt 2026-03-03 21:49:08 -08:00
parent 97da117ccb
commit e81b47bccf
20 changed files with 2852 additions and 1552 deletions

View file

@ -9,6 +9,12 @@ This format follows Keep a Changelog principles and aims for Semantic Versioning
## [Unreleased]
### Added
- **Backend Standardization Framework**: Improved code organization and maintainability
- Response builder utilities for consistent HTTP responses
- Telemetry decorators for route access tracking and error logging
- Route pattern documentation defining standards for all routes
- Split monolithic build route handler into focused, maintainable modules
- Foundation for integrating custom exceptions into web layer
- **Template Validation Tests**: Comprehensive test suite for HTML/Jinja2 templates
- Validates Jinja2 syntax across all templates
- Checks HTML structure (balanced tags, unique IDs, proper attributes)
@ -92,6 +98,11 @@ This format follows Keep a Changelog principles and aims for Semantic Versioning
- Optimized linting rules for development workflow
### Fixed
- **Multi-Copy Package Detection**: Fixed bug preventing multi-copy suggestions from appearing in New Deck wizard
- Corrected key mismatch between archetype definitions ('tagsAny') and detection code ('tags_any')
- Multi-copy panel now properly displays when commander and theme tags match supported archetypes (e.g., Hare Apparent for Rabbit Kindred + Tokens Matter)
- Updated panel background color to match theme (now uses CSS variable instead of hardcoded value)
- Affects all 12 multi-copy archetypes (Hare Apparent, Slime Against Humanity, Dragon's Approach, etc.)
- **Card Data Auto-Refresh**: Fixed stale data issue when new sets are released
- Auto-refresh now deletes cached raw parquet file before downloading fresh data
- Ensures new sets are included instead of reprocessing old cached data