4cee9966c355d9675fc565654c1c7bf8877f6f2c
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
9c34a45ba6 |
docs: Add verification checklist for Phase 4.6
Update the verification checklist to cover all aspects of Phase 4.6 (CreateCollection manual books support). New verification sections: - Section 6.4: Verify CreateCollection Endpoint Manual Books Support - Struct field verification (ManualBookIDs) - Validation tag verification (validate:"max=50") - Handler implementation verification - Error handling and logging verification - Graceful degradation verification - Section 19.1b: Verify Collections Bruno Tests Created - New bruno/collections/ directory structure - All 5 required test files - Test coverage verification - Section 19.1b: Verify Collections API Documentation - manual_book_ids field documentation - Validation limits (max 50) - Example requests - Error handling explanation - Backward compatibility notes Bug fix: - Fixed BuildSections function signature to match actual service (services.DashboardSection instead of services.SectionItems) All verification includes: - Step-by-step verification commands - Common pitfalls to avoid - Success criteria for each section |
||
|
|
da33e2c126 |
docs: update Carousel Dashboard plan and resolve verification checklist discrepancies
Updated Carousel Dashboard documentation to reflect finalized architecture decisions and resolve discrepancies between plan and verification checklist. ## CAROUSEL_DASHBOARD_PLAN.md Changes ### Added Phase 4.5: Collections Preview Endpoint - Documented why preview endpoint is required (web UI + mobile apps) - Explained why client-side preview is a bad idea (download entire library, code duplication, maintenance nightmare) - Added full PreviewCollection handler implementation - Added Bruno test specification ### Enhanced Phase 7: Router Registration & Config Setup - Renamed from "Router Registration" to "Router Registration & Config Setup" - Added Step 1: Update router.go Config struct with line numbers - Added Step 2: Update main.go initialization with line numbers - Added Step 3: Update test_helpers.go with line numbers - Added explanation: Why both DashboardService AND DashboardHandler? ### Updated Phase 10.5.4: Collections Preview Endpoint - Referenced Phase 4.5 (endpoint already implemented earlier) - Clarified needed for web UI AND mobile apps - Noted no additional work needed ### Added Phase 10.6: Implementation Checklist - 30+ checklist items with file paths and verification commands - Organized by layer (Database, Service, Handler, Router, Templates, TypeScript, Tests, Docs) - Added Build & Verification section - Added Timeline Estimate (20-26 hours) - Added Post-Implementation Tasks ## CAROUSEL_DASHBOARD_VERIFICATION_CHECKLIST.md Changes ### Added Clarification Section (at top) - Explained all discrepancies between plan and checklist - Preview endpoint IS in plan (Phase 4.5) - Custom Section Builder IS in plan (Phase 10.5.2 and 10.5.3) - Service method names - Plan is correct - Config struct - Documented with exact line numbers - DashboardService vs DashboardHandler - Explained why both needed ### Updated Service Method Names (Section 3.2) Changed to match plan's actual implementation: - GetDashboardSections (not GetSectionItems) - filterHiddenCollections (not filterHiddenSections) - reorderCollections (not reorderSections) - sortByPriority (new method) - getUserCollectionItems (not getCollectionSections) - getCollectionItemsByQueryType (renamed) ### Enhanced Config Verification (Section 6.4) Added exact line numbers for all 3 files: - internal/router/router.go lines 58-59 - cmd/server/main.go lines 123-124, 172-173 - cmd/server/tests/test_helpers.go lines 419-420, 458-459 ### Updated Preview Endpoint Section (Section 6.3) Added clear explanation of why endpoint is REQUIRED and why NOT client-side. ### Clarified Custom Section Builder (Sections 8.5, 9.4) Both now explicitly state "IS in the plan (Phase 10.5)" ## docs/developer/api/dashboard.md Changes Updated API documentation to match new unified collections architecture: - Terminology: "smart sections" → "system collections" - Field: `type: string` → `is_system: boolean` - Field: `id` → `media_item_id` for books - Request: `hidden_sections` → `hidden_collections` - Request: `section_order` → `collection_order` - Removed: "in-progress" and "unread" smart sections - Added: Update Dashboard Preferences endpoint - Added: Restore System Collection endpoint - Updated: Example responses with new field names and types - Updated: Error responses table ## Impact These changes clarify: 1. Preview endpoint is required for both web UI custom section builder and mobile apps 2. Custom Section Builder IS a major feature in the plan (not missing) 3. Service method names use "collections" terminology consistently 4. Config struct updates are clearly documented with exact line numbers (3 files only) 5. Why both DashboardService AND DashboardHandler are needed in Config All documentation now accurately reflects the finalized Carousel Dashboard architecture. |
||
|
|
5bb28e5dfa |
docs(dashboard): update verification checklist for unified collections architecture
UPDATES:
- Remove smart_section_types table references
- Update for collections table with user_id, query_type, priority, is_system_collection
- Update TypeScript type examples (8 fields instead of 11)
- Update type field values ('system'/'user' instead of 'smart'/'collection')
- Update method names: getContinueReading, getNotStarted, RestoreSystemCollection
- Update field names: hidden_collections, collection_order
- Update template verification for collection terminology
- Add per-collection restore button verification
- Remove getInProgress and getUnread method references
- Update all example code to match unified architecture
VERIFICATION:
- All checklist items now verify unified collections approach
- Type examples show correct 8-field structure
- System collections properly distinguished from user collections
- Per-collection restore functionality included
|
||
|
|
6d9b1e065e |
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
|
||
|
|
8d37df249d |
docs(dashboard): update Carousel plan for post-TypeScript conversion
Major updates: - Reduce smart sections from 5 to 4 (removed 'In Progress') - Continue Reading: 0% < progress < 100% - Recently Added: newest items - Recently Read: progress >= 100% - Not Started: progress = 0% or no record - Update paths from web/ts/ to web/src/ structure - Add handler types instead of duplicate template types - Types defined in internal/handlers/dashboard.go - Templates import handlers.SectionData, handlers.BookInfo directly New features: - Drag-and-drop section reordering - Section visibility toggles - Items per section slider - Manual progress marking (mark as read/unread) TypeScript updates: - Use (window as any).api from web/src/api.ts - Use (window as any).showToast from web/src/toast.ts - Import types from web/src/types/dashboard.d.ts - Event delegation via data-action attributes Add verification checklist for comprehensive plan review: - Type definition verification against actual API responses - API contract and endpoint verification - Cross-reference verification for template-handler types - Progressive enhancement testing - Build and deployment verification |