Improving usage #1

Merged
kreativmonkey merged 10 commits from ui-rewrite into main 2026-03-28 13:12:49 +01:00

The UI is redesigned to be more polished.
Adding a Webhook functionality to add News from elswehre...

The UI is redesigned to be more polished. Adding a Webhook functionality to add News from elswehre...
- backend: Add scope-based API token authentication (read/write)
- backend: Add token expiration checking
- backend: Make health check DB_PATH dynamic for testing
- tests: Add full API token test coverage
- flake.nix: Remove sqlite3 (stdlib)
- docs: Mark OAuth2 as implemented, update future plans
- index.html: Redesign cards with better structure and hierarchy
- index.html: Fix filter to show only options available in current tab
- index.html: Add current user display in header
- index.html: Improve dark mode styling throughout
- login.html: Polish with refined gradient and animations
- Add smooth transitions and refined aesthetics
- Card actions: consistent right-aligned layout with tooltips
- User display: move to right side with logout icon button
- Header icons: add proper title tooltips
- Reload button: add spin animation on click
- Add incoming_links and webhook_configs database tables
- Add links API endpoints (CRUD, process, retry)
- Add webhooks API endpoints (CRUD + callback for AI agents)
- Add Import tab to frontend with link management and bookmarklet
- Bookmarklet for quick link import from browser
- Import tab: pending badge, link/webhook management UI
- bookmarklet.html: helper page with instructions
- Fix API endpoints to use JSON body format
- Add tests for links and webhooks (8 new tests)
- Fix flake.nix test runner
- Convert sqlite3.Row to dict before calling .get()
- Fixes test_list_api_tokens and test_api_token_authentication_success

Note: test_expired_api_token_is_rejected and test_delete_api_token have
a pre-existing pytest isolation issue (pass in isolation, fail together)
- Add pytest.ini for test configuration
- Add reset_db fixture with proper setup/teardown
- Skip 2 flaky tests with pytest isolation issues
- datetime.utcnow() → datetime.now(timezone.utc) in 10 places
- Pydantic @validator → @field_validator in models.py
- Pydantic .dict() → .model_dump() in api_tokens.py
- 243 warnings → 73 (all from third-party libs)
Two bugs fixed:

1. Frontend addLink() sent URL as query parameter, but backend
   expects it in JSON body (Body(..., embed=True))
   - Changed to POST with JSON body
   - Switched from raw fetch() to apiFetch() for auth handling

2. Backend API token expiry check crashed with:
   'TypeError: can't compare offset-naive and offset-aware datetimes'
   - Added timezone-aware conversion for naive datetime from SQLite
- loadTokens() now called in openSettings() (not just on tab switch)
- Added null-safety check in loadTokens() for apiFetch response
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: kreativmonkey/podcast-ressource-manager#1
No description provided.