mirror of
https://github.com/Donkie/Spoolman.git
synced 2026-10-21 17:42:16 -05:00
Implements the search feature for client_v2: a new backend search endpoint plus a results-panel UI, replacing the old query box that only filtered the library list by filament name. Backend (additive, API v1 backward compatibility preserved): - New GET /api/v1/search returning categorized spool/filament/vendor results, each annotated with the field that matched, plus an is_color_query flag. - Case-insensitive text search over native text fields and text/choice extra fields; exact spool-id match for numeric queries; color-similarity search (CSS color name or hex) via find_by_color, ordered closest first. - spoolman/colors.py resolves the CSS4 color names / hex codes to hex. - Integration tests (run across SQLite/PostgreSQL/MySQL/CockroachDB in CI). Frontend (client_v2): - SearchBox overlay with Spools/Filaments/Manufacturers sections, per-result match badges, keyboard navigation, a color-similarity threshold slider (persisted to localStorage), and an English-only color-name hint. - Clicking a result opens the matching inspector on the Library page. - Removes the old q -> filament.name inline list filtering. Claude-Session: https://claude.ai/code/session_01Ne7RsfHejKZX97uAq3aVMn