john-okeefe
e7f30a00c0
style(templates): fix code formatting with consistent indentation
...
-- Reformat all generated template Go files with consistent indentation
-- Standardize code style across templates/
-- No functional changes, formatting only
-- Generated by templ tool during development
2026-02-23 20:24:10 -05:00
john-okeefe
9ea0ec5a3e
feat(templates): consolidate admin and profile templates
...
Add admin_users.templ for user management interface with delete, password
reset, and edit capabilities. Add profile.templ and related components for
user profile management. Remove admin_profile.templ. Update all templates
to use new consolidated API endpoints.
2026-02-22 01:58:02 -05:00
john-okeefe
0c515a277c
refactor(templates): add error toast support to page templates
...
Update all page templates to accept an optional error message parameter
and display it via the ErrorToast component when data loading fails.
2026-02-20 13:25:49 -05:00
john-okeefe
81c72e706a
chore(templates): regenerate template files after templ update
...
Regenerate all _templ.go files with latest templ generator.
Changes are minimal formatting updates (error message file paths).
2026-02-16 16:51:10 -05:00
john-okeefe
2a64ca423f
Refactor: Eliminate duplicate types - Use handler types directly
...
- Deleted templates.CollectionDetailData - using templates.CollectionData everywhere
- Deleted templates.BookData - using handlers.BookInfo everywhere
- Deleted templates.DeviceData - using handlers.DeviceInfo everywhere
- Deleted templates.ProgressItemData - using handlers.ProgressWithMedia everywhere
- Deleted templates.convertDevices() helper - Use handlers types directly in templates
- Enhanced handlers.ProgressWithMedia with device metadata fields
- Added handlers.getDeviceIcon() helper
- Updated all templates to import handlers package
- Cleaned up unused imports
This aligns codebase with templ's design philosophy (use Go types directly, no parallel type system)
2026-02-12 19:48:07 -05:00
john-okeefe
826ea2de26
chore(templates): regenerate templates from build process
...
- Update all templates from latest templ build
- No functional changes, just formatting/build artifacts
- Includes updates to admin, collections, conflicts, devices, and queue templates
- Part of regular template maintenance
2026-02-06 21:59:20 -05:00
john-okeefe
ed0a41e2d1
refactor: remove templates/ prefix from template error file names
...
Clean up generated template code to use simpler file paths in error messages by removing the redundant templates/ directory prefix.
2026-02-02 21:18:56 -05:00
john-okeefe
afdcc7b589
docs: add API explorer template component and fix rendering
...
Phase 3 part 1: Add interactive API explorer
- Create templates/api_explorer.templ with mock and real modes
- Add EndpointInfo and APIExplorerData types to templates/types.go
- Fix markdown rendering with UnsafeHTML.ToComponent()
- Add templ import for Component support
- API explorer supports:
- Mock data mode for non-authenticated users
- Real execution mode for logged-in users
- Request/response display
- cURL generation
- Copy to clipboard
2026-02-02 08:56:23 -05:00
john-okeefe
a8e904a7fb
regenerate templ files with updated file paths
2026-02-01 21:18:05 -05:00
john-okeefe
bb713f6300
Rename frontend template references: Bookmann → Bookhoard
...
Template changes:
- Update page titles: "Bookmann" → "Bookhoard"
- Update header branding and navigation text
- Regenerate compiled .go templates from .templ sources
- Update all UI references in HTML templates
This is part 3 of the project rename to Bookhoard.
2026-02-01 16:11:59 -05:00
john-okeefe
592ccddf65
feat(collections): implement rule testing/preview functionality (Limitation #1 )
...
Add ability to test collection rules before saving:
- New API endpoint: POST /api/collections/test-rules
- Evaluates rules against all media items
- Returns matching books with reasons
- Supports all operators: equals, contains, greater_than, etc.
- Works with all fields: genre, author, series, etc.
Backend Implementation:
- TestRules() handler in collections.go
- evaluateRule() matches book properties against rule criteria
- compareValues() handles string/numeric comparisons
- Case-insensitive matching for contains operator
Frontend Integration:
- Updated testRule() function in collection_rules.templ
- Displays matching books with covers and authors
- Shows match reason (which rule criteria matched)
- Limits preview to 20 results with count indicator
Tests Added:
- TestCompareValues_Equals: Exact match validation
- TestCompareValues_Contains: Substring matching
- TestCompareValues_GreaterThan: Numeric comparison
- TestCompareValues_NotEquals: Negation
- TestEvaluateRule_Genre: Genre field matching
- TestEvaluateRule_Author: Author field matching
- TestEvaluateRule_CopyrightYear: Year field matching
API Request Format:
{
"rules": [{
"field": "genre",
"operator": "equals",
"value": "Science Fiction"
}]
}
API Response Format:
{
"matches": [{
"media_item_id": "uuid",
"title": "Book Title",
"author": "Author Name",
"cover_image_path": "/path/to/cover.jpg",
"match_reason": "Matched rule: genre equals Science Fiction"
}],
"total": 42
}
Resolves Limitation #1 : Rule Testing Preview
2026-02-01 00:49:22 -05:00
john-okeefe
9411a95c44
feat(collections): add auto-assign rule builder UI (Phase 9-5)
...
Add visual rule builder for creating collection auto-assign rules:
- Rule condition builder: Create rules based on genre, author, series, etc.
- Operator selection: equals, contains, starts with, greater than, etc.
- Rule list management: Add, edit, delete rules with priority ordering
- Real-time preview: See which books match the rules
- Drag-and-drop reordering: Set rule priority
Features:
- Multi-field conditions (genre, series, author, language, publisher, year, tags)
- Logical operators for complex conditions
- Rule testing before saving
- Visual confidence indicators
- Bulk book assignment tools
This enables smart collection management where books are automatically
assigned to collections based on metadata criteria, reducing manual
organization effort.
2026-02-01 00:25:58 -05:00