Skip to content

Sync with Upstream#8

Merged
Domoel merged 67 commits intoDomoel:mainfrom
crocodilestick:main
Nov 30, 2025
Merged

Sync with Upstream#8
Domoel merged 67 commits intoDomoel:mainfrom
crocodilestick:main

Conversation

@Domoel
Copy link
Owner

@Domoel Domoel commented Nov 30, 2025

No description provided.

lazyusername and others added 30 commits November 1, 2025 12:48
Use cases:
* setting subject to CONVERT to use Amazon format conversion (#721)
* adding labels to trigger KoboMail processing (#362)

Default subject (localised "Send to eReader") is used if `kindle_mail_subject` is blank.

* add `kindle_mail_subject` attribute to User model and related database schema
* add `subject` parameter to `send_mail()`
* update profile and user admin UI/endpoints
* whitespace linting
…eduling)

Add 30 fast static verification tests (<0.1s) covering:
- Auto-send user persistence (DB, handlers, template, task integration)
- Auto-send delay validation (1-60 minute range, clamping, defaults)
- Convert Library & EPUB Fixer scheduling (routes, endpoints, DB, UI)

Tests verify code structure exists without requiring Flask dependencies,
ensuring proper integration before runtime execution.

All tests passing (30/30) in 0.06s
Create lightweight CalibreTask wrappers to surface scheduled operations
in the Tasks UI:
- TaskConvertLibraryRun: Triggers /cwa-convert-library-start endpoint
- TaskEpubFixerRun: Triggers /cwa-epub-fixer-start endpoint

Both tasks:
- Poll service logs for progress updates (heuristic N/M parsing)
- Support cancellation via cancel endpoints
- Display in Tasks page with real-time progress
- Handle port override via CWA_PORT_OVERRIDE environment variable

Integrates scheduled operations into existing background task system
for consistent UX across all automated services.
Enhance user feedback with toast notifications:

tasks.html:
- Add showNotification() helper for consistent toast display
- Enhanced cancelScheduled() with success/error feedback

cwa_convert_library.html & cwa_epub_fixer.html:
- Convert schedule links to AJAX buttons
- Add scheduleConvertLibrary(5|15) and scheduleEpubFixer(5|15) functions
- Show success/error notifications for all scheduling actions
- Maintain existing manual trigger functionality

All notifications:
- Positioned top-right with 4-second auto-dismiss
- Use Bootstrap's alert-success/alert-danger styling
- Provide clear action confirmation to users
Enhance user feedback with toast notifications:

tasks.html:
- Add showNotification() helper for consistent toast display
- Enhanced cancelScheduled() with success/error feedback

cwa_convert_library.html & cwa_epub_fixer.html:
- Convert schedule links to AJAX buttons
- Add scheduleConvertLibrary(5|15) and scheduleEpubFixer(5|15) functions
- Show success/error notifications for all scheduling actions
- Maintain existing manual trigger functionality

All notifications:
- Positioned top-right with 4-second auto-dismiss
- Use Bootstrap's alert-success/alert-danger styling
- Provide clear action confirmation to users
- Implement `EpubProgressCalculator` for single-pass EPUB parsing to fix repeated I/O
- Move blacklist database check outside the annotation processing loop
- Refactor sync logic to reuse calculated progress and blacklist statusOptimize Kobo annotation sync performance

- Implement `EpubProgressCalculator` for single-pass EPUB parsing to fix repeated I/O
- Move blacklist database check outside the annotation processing loop
- Refactor sync logic to reuse calculated progress and blacklist status
…sync

feature: Kobo Annotation to Hardcover.app sync
chore: polish function add_aliases() in scripts/setup-cwa.sh
#739 Fix content type for mobi/prc book formats
Add per-user customisable email subject for "send to eReader" emails
fix: apply metadata to file even when no cover.jpg is present
KOReader Progress Syncing with Book Identification & Kobo Integration
Previously, the integration tests pulled the `latest` image from Docker Hub. This caused a race condition where tests would run against the last successful build rather than the code in the current PR/commit.

This commit updates the `integration-tests` workflow to:
- Remove the `docker pull` step.
- Build the Docker image ephemerally within the test job using `docker/build-push-action`.
- Load the built image directly into the runner's Docker daemon.
- Ensure tests run against the exact code being verified.

This ensures that changes to the codebase (like the recent checksum logic fixes) are actually present in the container during testing.
The integration tests were failing because the ingest processor was attempting to look up newly imported books by title to generate checksums. This lookup was unreliable immediately after import, causing checksum generation to be skipped.

This commit updates `scripts/ingest_processor.py` to:
- Modify `generate_book_checksums` to accept an optional `book_id` parameter.
- Prioritize looking up the book by `book_id` if provided, falling back to title lookup only if necessary.
- Pass the `last_added_book_id` (captured from `calibredb` output) when calling `generate_book_checksums`.

This ensures that the correct book is targeted for checksum generation, resolving the test failures.
@Domoel Domoel merged commit 209af29 into Domoel:main Nov 30, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants