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