john-okeefe
39a87ddabc
feat: integrate WebSocket for real-time scan progress in admin panel
...
- Add WebSocket connection for scan progress updates
- Display live progress bar and file count during scans
- Handle scan_complete and scan_error messages
- Store polling interval in module variable for cleanup
- Expose stopScanStatusPolling function for manual control
Replaces or supplements HTTP polling with push-based updates for
better UX and reduced server load.
2026-03-05 17:13:23 -05:00
john-okeefe
ea5ad7a41b
feat(web): update frontend TypeScript modules and API types
...
This commit updates the web frontend TypeScript modules:
Core modules:
- admin.ts: Admin panel functionality and user management
- analytics.ts: Analytics dashboard and data visualization
- api-explorer.ts: Interactive API documentation explorer
- api.ts: Core API client with request/response handling
- collections.ts: Book collection management UI
- conflicts.ts: Sync conflict resolution interface
- custom-section-builder.ts: Dynamic section builder for UI
- docs.ts: Documentation viewer and navigation
- dom.ts: DOM manipulation utilities and helpers
- header.ts: Application header with navigation
- library.ts: Library view and book grid management
- linking.ts: Device-book linking interface
- password_validation.ts: Client-side password strength validation
- queue.ts: Device sync queue management UI
- search.ts: Full-text search with Lunr integration
- storage.ts: Local storage and cache management
- theme.ts: Theme management and CSS variable updates
- themeDropdown.ts: Theme selector dropdown component
- toast.ts: Toast notification system
- woodPaneling.ts: Visual theme effects
- woodPanelingInit.ts: Visual effects initialization
Type definitions:
- api.d.ts: Updated TypeScript definitions for API responses
These updates enhance the frontend with improved functionality
for book management, device synchronization, and user experience.
2026-02-27 17:06:48 -05:00
john-okeefe
abcc468024
frontend: add force rescan to button and watch status display
...
- Send force: true in scan API request body
- Rename 'Scan Library' button to 'Rescan Library'
- Replace Settings card with Watch Status display
- Add loadWatchStatus() to fetch and display watch mode status
- Remove inline script from admin.templ (moved to admin.ts)
2026-02-26 10:11:52 -05:00
john-okeefe
64e1ba87b9
Implement Part 1: Fix Scan Library button with progress UI
...
Implements the frontend scan button fix from TASKS-scanning-progress.md Part 1.
Changes:
1. web/src/admin.ts - Added 6 new TypeScript functions:
- scanAllLibraries(): Fetches all libraries, triggers scan for each
- showScanProgress(): Displays progress UI with per-library progress bars
- pollScanProgress(): Polls status every 2 seconds, updates progress
- updateLibraryProgress(): Updates individual library progress bar/status
- showScanResults(): Displays scan completion results
- hideScanProgress(): Hides progress UI
2. templates/admin.templ - Updated UI:
- Added admin.js script include (Step 2)
- Changed button onclick from quickScan() to scanAllLibraries() (Step 3)
- Removed broken inline quickScan() function (Step 3.5)
- Added progress UI HTML with slide-in animation (Step 4)
Key Features:
- Fetches all libraries via GET /api/libraries
- Triggers scan for each library via POST /api/libraries/{id}/scan
- Displays per-library progress bars
- Shows overall progress percentage
- Real-time status updates every 2 seconds
- Results summary with file counts and errors
- TailwindCSS animation (no custom CSS)
- Follows PROJECT_GUIDELINES.md: TypeScript only, TailwindCSS classes
TypeScript compiles successfully (npm run build:ts)
All guidelines verified (26/26 checks pass)
2026-02-25 12:20:48 -05:00
john-okeefe
dfd9cbcde7
feat(typescript): add feature modules for template conversion
...
- Add search.ts - header search with keyboard navigation
- Debounced search with 300ms delay
- Arrow key navigation through results
- Escape to close, Enter to select
- Library type icons and highlighting
- Add collections.ts - collection and rule management
- Rule CRUD operations (create, update, delete)
- Rule testing functionality
- Bulk collection operations
- Add bookshelf.ts - book display and navigation
- Library selection state management
- Book viewing interactions
- Pagination logic
- Add linking.ts - book matching and manual linking
- Search and match functionality
- Manual link modal
- Bulk auto-link and suggestions
- Add api-explorer.ts - API testing interface
- Request/response display
- cURL command generation
- History tracking
- Add admin.ts - admin dashboard actions
- Library scan triggers
- System statistics display
- Profile management
- Add analytics.ts - analytics data loading
- Chart.js integration
- Daily reading minutes chart
- Device usage and popular books display
- Add queue.ts - sync queue management
- Process pending items
- Clear failed/all items
- Filter by status, type, device
- Add conflicts.ts - conflict resolution
- Individual and bulk resolve operations
- Winner device selection
- Manual override inputs
- Add docs.ts - documentation search
- Lunr.js search integration
- Sidebar toggle for mobile
2026-02-18 16:40:51 -05:00