Skip to content

fix: fix lazy associations, LazyInitalizationErrros, address OSIV tech-debt#42

Open
balazs-szucs wants to merge 29 commits intogrimmory-tools:developfrom
balazs-szucs:OSIV
Open

fix: fix lazy associations, LazyInitalizationErrros, address OSIV tech-debt#42
balazs-szucs wants to merge 29 commits intogrimmory-tools:developfrom
balazs-szucs:OSIV

Conversation

@balazs-szucs
Copy link
Member

@balazs-szucs balazs-szucs commented Mar 18, 2026

📝 Description

NOTE: this is almost straight from my PR to former BL upstream. Most of the works has been done in January, original PR submitted in February, and since then I have been running these changes on my private fork.

The port to grimmory, is strictly WIP. Better PR message is to after follow this.

Linked Issue: Fixes #

Required. Every PR must reference an approved issue. If no issue exists, open one and wait for maintainer approval before submitting a PR. Unsolicited PRs without a linked issue will be closed.

🏷️ Type of Change

  • Bug fix
  • New feature
  • Enhancement to existing feature
  • Refactor (no behavior change)
  • Breaking change (existing functionality affected)
  • Documentation update

🔧 Changes

🧪 Testing (MANDATORY)

PRs without this section filled out will be closed. "Tests pass" or "Tested locally" is not sufficient. You must provide specifics.

Manual testing steps you performed:

Regression testing:

Edge cases covered:

Test output:

Backend test output (./gradlew test)
PASTE OUTPUT HERE
Frontend test output (ng test)
PASTE OUTPUT HERE

📸 Screen Recording / Screenshots (MANDATORY)

Every PR must include a screen recording or screenshots showing the change working end-to-end in a running local instance (both backend and frontend). This means you must have actually built, run, and tested the code yourself. PRs without visual proof will be closed without review.


✅ Pre-Submission Checklist

All boxes must be checked before requesting review. Incomplete PRs will be closed without review. No exceptions.

  • This PR is linked to an approved issue
  • Code follows project backend and frontend conventions
  • Branch is up to date with develop (merge conflicts resolved)
  • I ran the full stack locally (backend + frontend + database) and verified the change works
  • Automated tests added or updated to cover changes (backend and frontend)
  • All tests pass locally and output is pasted above
  • Screen recording or screenshots are attached above proving the change works
  • PR is a single focused change (one bug fix OR one feature, not multiple unrelated changes)
  • PR is reasonably scoped (PRs over 1000+ changed lines will be closed, split into smaller PRs)
  • No unsolicited refactors, cleanups, or "improvements" are bundled in
  • Flyway migration versioning is correct (if schema was modified)
  • Documentation PR submitted to booklore-docs (if user-facing changes)

🤖 AI-Assisted Contributions

If any part of this PR was generated or assisted by AI tools (Copilot, Claude, ChatGPT, etc.), all items below are mandatory. You are fully responsible for every line you submit. "The AI wrote it" is not an excuse, and AI-generated PRs that clearly haven't been reviewed are the #1 reason PRs get closed.

  • I have read and understand every line of this PR and can explain any part of it during review
  • I personally ran the code and verified it works (not just trusted the AI's output)
  • PR is scoped to a single logical change, not a dump of everything the AI suggested
  • Tests validate actual behavior, not just coverage (AI-generated tests often assert nothing meaningful)
  • No dead code, placeholder comments, TODOs, or unused scaffolding left behind by AI
  • I did not submit refactors, style changes, or "improvements" the AI suggested beyond the scope of the issue

💬 Additional Context (optional)

Summary by CodeRabbit

  • Performance Improvements

    • Faster list and shelf loading via smarter prefetching and batch loading.
  • Reading Progress

    • Improved auto-progress handling: completion detection and finished-date auto-setting.
    • More consistent default read status for accurate tracking.
  • Audio Metadata

    • More reliable audiobook metadata extraction (duration, chapters, cover art).
  • Chores

    • Wider transactional and data-loading consistency for more reliable operations.

balazs-szucs and others added 22 commits February 9, 2026 13:29
…erformance

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
# Conflicts:
#	booklore-api/src/main/java/org/booklore/controller/MetadataController.java
#	booklore-api/src/main/java/org/booklore/service/book/BookService.java
# Conflicts:
#	booklore-api/src/main/java/org/booklore/service/reader/EpubReaderService.java
…in fallback test

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
# Conflicts:
#	booklore-api/src/main/java/org/booklore/service/ReadingSessionService.java
# Conflicts:
#	booklore-api/src/main/java/org/booklore/service/reader/EpubReaderService.java
…rService

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
# Conflicts:
#	booklore-api/src/main/java/org/booklore/controller/MetadataController.java
#	booklore-api/src/main/java/org/booklore/service/ShelfService.java
#	booklore-api/src/main/java/org/booklore/service/book/BookReviewService.java
#	booklore-api/src/main/java/org/booklore/service/book/BookService.java
#	booklore-api/src/main/java/org/booklore/service/opds/OpdsBookService.java
#	booklore-api/src/main/java/org/booklore/service/opds/OpdsUserV2Service.java
#	booklore-api/src/test/java/org/booklore/controller/MetadataControllerTest.java
#	booklore-api/src/test/java/org/booklore/service/library/LibraryProcessingServiceRegressionTest.java
…improve metadata retrieval

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
…amline user permission retrieval

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
…ds for improved data retrieval

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
…ove test clarity

Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
# Conflicts:
#	booklore-api/src/main/java/org/booklore/repository/BookRepository.java
#	booklore-api/src/main/java/org/booklore/service/ReadingSessionService.java
#	booklore-api/src/main/java/org/booklore/service/book/BookService.java
#	booklore-api/src/main/java/org/booklore/service/opds/OpdsBookService.java
#	booklore-api/src/main/java/org/booklore/service/reader/AudioMetadataService.java
#	booklore-api/src/main/java/org/booklore/service/reader/EpubReaderService.java
#	booklore-api/src/main/java/org/booklore/service/upload/FileUploadService.java
#	booklore-api/src/test/java/org/booklore/service/library/LibraryProcessingServiceRegressionTest.java
#	booklore-api/src/test/java/org/booklore/service/library/LibraryProcessingServiceTest.java
# Conflicts:
#	booklore-api/src/main/java/org/booklore/config/security/filter/AbstractQueryParameterJwtFilter.java
#	booklore-api/src/main/java/org/booklore/config/security/filter/AudiobookStreamingJwtFilter.java
#	booklore-api/src/main/java/org/booklore/config/security/filter/DualJwtAuthenticationFilter.java
#	booklore-api/src/main/java/org/booklore/config/security/filter/EpubStreamingJwtFilter.java
#	booklore-api/src/main/java/org/booklore/config/security/filter/JwtAuthenticationFilter.java
#	booklore-api/src/main/java/org/booklore/controller/MetadataController.java
#	booklore-api/src/main/java/org/booklore/service/library/LibraryService.java
#	booklore-api/src/main/java/org/booklore/service/metadata/BookCoverService.java
#	booklore-api/src/main/java/org/booklore/service/metadata/BookMetadataUpdater.java
#	booklore-api/src/main/java/org/booklore/service/reader/AudioMetadataService.java
#	booklore-api/src/test/java/org/booklore/controller/MetadataControllerTest.java
#	booklore-api/src/test/java/org/booklore/service/metadata/BookCoverServiceTest.java
#	booklore-api/src/test/java/org/booklore/service/metadata/BookMetadataServiceConcurrencyTest.java
#	booklore-api/src/test/java/org/booklore/service/metadata/BookMetadataServiceTest.java
@balazs-szucs balazs-szucs marked this pull request as draft March 18, 2026 11:05
# Conflicts:
#	booklore-api/src/main/java/org/booklore/service/reader/AudioMetadataService.java
@coderabbitai

This comment was marked as spam.

@balazs-szucs balazs-szucs marked this pull request as ready for review March 18, 2026 21:44
coderabbitai[bot]

This comment was marked as spam.

balazs-szucs and others added 2 commits March 20, 2026 16:33
* chore(ui): drop support animation preferences

* chore(ui): drop unused github support dialog

* chore(ui): drop github support dialog
imajes and others added 2 commits March 20, 2026 16:58
- stop publishing unit test results directly from the pull_request test jobs\n- upload the GitHub event payload from CI so a follow-up workflow can reuse the original PR context\n- add a workflow_run publisher that downloads backend/frontend test artifacts and posts the check runs and PR comments with the permissions Dependabot PRs require\n- keep the reusable test suite focused on executing tests and producing artifacts without failing on comment permissions
@balazs-szucs balazs-szucs changed the base branch from main to develop March 20, 2026 22:02
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.

3 participants