docs: add custom section builder and backend testing to Carousel dashboard
- Add custom section builder functionality (Phase 9.3)
- Template for creating filter-based sections with auto-assign rules
- Dynamic rule builder UI (field, operator, value, priority)
- Preview functionality to see matching books before creating
- Integration with existing collections API
- Add TypeScript implementation (Phase 10.3)
- web/src/custom-section-builder.ts
- Procedural style with event delegation
- Rule collection, preview, and form submission
- No duplicate event listeners (delegation only)
- Add backend testing suite (Phase 12)
- Unit tests for dashboard service (filter, reorder)
- Unit tests for dashboard handler (buildSections, helpers)
- Integration tests with test_helpers for API endpoints
- Integration tests for custom collections with auto-assign
- Coverage requirements (>80%)
- Add collections preview endpoint
- POST /api/collections/preview
- Evaluates auto-assign rules against library items
- Returns matching books for preview
- Add /custom-section route
- GET route for custom section builder page
- SSR rendering with libraries selector
- Linked from dashboard settings modal
- Update database schema
- Keep smart_section_types table for 4 default smart sections
- Add collection_items.excluded column for user overrides
- Index on excluded items for performance
- Update verification checklist
- Section 2.2: Add collection_items.excluded verification
- Section 3.4: Add auto-assign rule evaluation verification
- Section 6.3: Add collections preview endpoint verification
- Section 8.5: Add custom section builder template verification
- Section 9.4: Add custom section builder TypeScript verification
- Section 14.4: Add backend tests verification
- Fix duplicate event listener issue
- Removed duplicate change listener for library selector
- Rely on event delegation only for consistency
- Fix buildJSONSections type safety
- Now reuses buildSections() instead of map[string]interface{}
- Better type safety and code reuse
Timeline: 3-4 days dashboard implementation + comprehensive testing
This commit is contained in:
+1284
-1546
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user