fix(backend): Fix metadata fields being stripped from API response, causing issues with filtering.#250
Conversation
## [2.3.0](grimmory-tools/grimmory@v2.2.6...v2.3.0) (2026-03-21) ### Features * **release:** document develop-based stable release previews ([930e526](grimmory-tools@930e526)) ### Bug Fixes * **api:** fix potential memory leaks in file processing ([031e8ae](grimmory-tools@031e8ae)) * **ci:** correct artifact download action pin ([37ca101](grimmory-tools@37ca101)) * **ci:** publish PR test results from workflow_run ([11a76bf](grimmory-tools@11a76bf)) * **ci:** repair release preview and test result publishing ([afa5b81](grimmory-tools@afa5b81)) * drop telemetry from app ([grimmory-tools#52](grimmory-tools#52)) ([4d82cb7](grimmory-tools@4d82cb7)) * **ui:** repair frontend compile after rebrand ([fea1ec6](grimmory-tools@fea1ec6)) ### Refactors * **build:** rename frontend dist output to grimmory ([ecf388f](grimmory-tools@ecf388f)) * **i18n:** rename booklore translation keys to grimmory ([eb94afa](grimmory-tools@eb94afa)) * **metadata:** move default parser from Amazon to Goodreads ([e252122](grimmory-tools@e252122)) * pull kepubify & ffprobe during build ([grimmory-tools#50](grimmory-tools#50)) ([1c15629](grimmory-tools@1c15629)) * **ui:** rebrand frontend surfaces to grimmory ([d786dd8](grimmory-tools@d786dd8)) ### Chores * **api:** remove the custom startup banner ([98c9b1a](grimmory-tools@98c9b1a)) * **deps:** bump flatted from 3.4.1 to 3.4.2 in /booklore-ui ([grimmory-tools#73](grimmory-tools#73)) ([c4bd0c7](grimmory-tools@c4bd0c7)) * **funding:** point support links at opencollective ([55c0ac0](grimmory-tools@55c0ac0)) * **release:** 2.2.7 [skip ci] ([0b5e24c](grimmory-tools@0b5e24c)) * remove old verbose PR template, replace with temporary more low-key one. ([grimmory-tools#84](grimmory-tools#84)) ([b868526](grimmory-tools@b868526)) * **ui:** drop financial support dialog ([grimmory-tools#21](grimmory-tools#21)) ([62be6b1](grimmory-tools@62be6b1)) ### Documentation * updated supported file formats in README.md ([grimmory-tools#68](grimmory-tools#68)) ([f912e80](grimmory-tools@f912e80)) ### Style * **i18n:** normalize translation json formatting ([grimmory-tools#89](grimmory-tools#89)) ([857290d](grimmory-tools@857290d)) * **ui:** simplify the topbar logo branding ([0416d48](grimmory-tools@0416d48))
📝 WalkthroughWalkthroughThe pull request introduces a new Changes
Poem
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
booklore-ui/src/app/features/book/service/book.service.ts (1)
96-114:⚠️ Potential issue | 🟠 MajorInconsistent
stripForListViewparameter betweenfetchBooks()andrefreshBooks().
fetchBooks()(line 75) explicitly passesstripForListView: falseto preserve metadata for frontend filtering, butrefreshBooks()does not pass this parameter. This meansrefreshBooks()will use the backend default (stripForListView=true), causing metadata to be stripped when the book state is refreshed.This inconsistency could break frontend filtering (e.g., magic shelves) after a refresh operation.
🐛 Proposed fix to add consistent parameter
refreshBooks(): void { - this.http.get<Book[]>(this.url).pipe( + this.http.get<Book[]>(this.url, {params: {stripForListView: false}}).pipe( tap(bookList => {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@booklore-ui/src/app/features/book/service/book.service.ts` around lines 96 - 114, refreshBooks() currently calls the backend without the stripForListView flag whereas fetchBooks() explicitly passes stripForListView: false, causing inconsistent metadata being returned; update refreshBooks() to call the same endpoint with stripForListView: false (mirror how fetchBooks() constructs its HTTP call) so the Book objects keep their metadata for frontend filtering (refer to refreshBooks(), fetchBooks(), and the stripForListView parameter).
🧹 Nitpick comments (4)
booklore-api/src/main/java/org/booklore/service/book/BookService.java (1)
75-86: ParameterStripForListViewshould use camelCase naming convention.The parameter
StripForListViewuses PascalCase, which violates Java naming conventions for method parameters. Parameters should use camelCase:stripForListView.This naming is inconsistent with the rest of the codebase (the controller uses
stripForListViewcorrectly at line 73).♻️ Proposed fix for naming convention
- public List<Book> getBookDTOs(boolean includeDescription, boolean StripForListView) { + public List<Book> getBookDTOs(boolean includeDescription, boolean stripForListView) { BookLoreUser user = authenticationService.getAuthenticatedUser(); boolean isAdmin = user.getPermissions().isAdmin(); List<Book> books = isAdmin - ? bookQueryService.getAllBooks(includeDescription, StripForListView) + ? bookQueryService.getAllBooks(includeDescription, stripForListView) : bookQueryService.getAllBooksByLibraryIds( getUserLibraryIds(user), includeDescription, - StripForListView, + stripForListView, user.getId() );As per coding guidelines: "Use 4-space indentation in Java files and match surrounding Java style."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@booklore-api/src/main/java/org/booklore/service/book/BookService.java` around lines 75 - 86, Rename the method parameter StripForListView to camelCase stripForListView in BookService.getBookDTOs and update all internal usages in that method (calls to bookQueryService.getAllBooks and bookQueryService.getAllBooksByLibraryIds) to use stripForListView; also update any call sites of BookService.getBookDTOs to pass the renamed parameter name so the signature matches callers and preserves functionality.booklore-api/src/main/java/org/booklore/service/book/BookQueryService.java (1)
25-34: ParameterStripForListViewshould use camelCase naming convention.Same naming issue as in
BookService.java: the parameterStripForListViewuses PascalCase instead of the Java-standard camelCasestripForListView.The logic correctly decouples the two parameters as intended by the PR.
♻️ Proposed fix for naming convention
- public List<Book> getAllBooks(boolean includeDescription, boolean StripForListView) { + public List<Book> getAllBooks(boolean includeDescription, boolean stripForListView) { List<BookEntity> books = bookRepository.findAllWithMetadata(); - return mapBooksToDto(books, includeDescription, null, StripForListView); + return mapBooksToDto(books, includeDescription, null, stripForListView); } - public List<Book> getAllBooksByLibraryIds(Set<Long> libraryIds, boolean includeDescription, boolean StripForListView, Long userId) { + public List<Book> getAllBooksByLibraryIds(Set<Long> libraryIds, boolean includeDescription, boolean stripForListView, Long userId) { List<BookEntity> books = bookRepository.findAllWithMetadataByLibraryIds(libraryIds); books = contentRestrictionService.applyRestrictions(books, userId); - return mapBooksToDto(books, includeDescription, userId, StripForListView); + return mapBooksToDto(books, includeDescription, userId, stripForListView); }As per coding guidelines: "Use 4-space indentation in Java files and match surrounding Java style."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@booklore-api/src/main/java/org/booklore/service/book/BookQueryService.java` around lines 25 - 34, Rename the parameter StripForListView to camelCase stripForListView in the method signatures for getAllBooks and getAllBooksByLibraryIds in BookQueryService (and update any corresponding overloads/usages), and update the internal call to mapBooksToDto to pass stripForListView instead of StripForListView; ensure all references (calls, tests, and any other methods like BookService if present) are updated to the new parameter name to keep the API consistent with Java naming conventions.CHANGELOG.md (1)
7-14: Consider documenting thestripForListViewAPI parameter change.The 2.3.0 changelog does not mention the new
stripForListViewquery parameter added toGET /api/v1/books. This is a notable API behavior change that consumers may need to know about, especially since the default behavior (stripForListView=true) differs from previous implicit behavior.Consider adding an entry under Bug Fixes or as an API note:
* **api:** add configurable `stripForListView` parameter to book list endpoint to preserve metadata for frontend filtering🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@CHANGELOG.md` around lines 7 - 14, Add a changelog entry documenting the new stripForListView query parameter on GET /api/v1/books introduced in 2.3.0: update CHANGELOG.md to include a line under the appropriate section (e.g., Bug Fixes or API Notes) that mentions the new stripForListView parameter, its default value (stripForListView=true), and the behavioral impact (preserves metadata for frontend filtering when set to false) so API consumers are aware of the change; reference the endpoint GET /api/v1/books and the parameter name stripForListView in the entry.booklore-api/src/test/java/org/booklore/service/book/BookServiceTest.java (1)
93-104: Test updated correctly for new signature; consider adding non-admin path coverage.The test correctly updates the stubbing and verification for the new two-boolean
getBookDTOs(includeDescription, StripForListView)signature.However, this test only covers the admin user path (
getAllBooks). The non-admin path (getAllBooksByLibraryIds) also received the newStripForListViewparameter but lacks test coverage. Consider adding a test case for a non-admin user to verify the parameter flows correctly through both code paths.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@booklore-api/src/test/java/org/booklore/service/book/BookServiceTest.java` around lines 93 - 104, Add a new unit test that mirrors getBookDTOs_adminUser_returnsBooksWithProgress but for the non-admin path: set authenticationService.getAuthenticatedUser() to a non-admin user (or mock isAdmin=false), stub bookQueryService.getAllBooksByLibraryIds(anySet(), anyBoolean(), anyBoolean()) to return a List<Book> and stub readingProgressService.fetchUserProgress(...) as needed, call bookService.getBookDTOs(includeDescription, stripForListView) with the same boolean args, assert the returned list and verify bookQueryService.getAllBooksByLibraryIds(...) was invoked with the expected library id set and the stripForListView flag (the new second boolean), and ensure readingProgressService.fetchUserProgress(...) is also verified; use the same helper objects (Book, UserBookProgressEntity, testUser variants) and method names from BookServiceTest to locate where to add the test.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@booklore-ui/src/app/features/book/service/book.service.ts`:
- Around line 96-114: refreshBooks() currently calls the backend without the
stripForListView flag whereas fetchBooks() explicitly passes stripForListView:
false, causing inconsistent metadata being returned; update refreshBooks() to
call the same endpoint with stripForListView: false (mirror how fetchBooks()
constructs its HTTP call) so the Book objects keep their metadata for frontend
filtering (refer to refreshBooks(), fetchBooks(), and the stripForListView
parameter).
---
Nitpick comments:
In `@booklore-api/src/main/java/org/booklore/service/book/BookQueryService.java`:
- Around line 25-34: Rename the parameter StripForListView to camelCase
stripForListView in the method signatures for getAllBooks and
getAllBooksByLibraryIds in BookQueryService (and update any corresponding
overloads/usages), and update the internal call to mapBooksToDto to pass
stripForListView instead of StripForListView; ensure all references (calls,
tests, and any other methods like BookService if present) are updated to the new
parameter name to keep the API consistent with Java naming conventions.
In `@booklore-api/src/main/java/org/booklore/service/book/BookService.java`:
- Around line 75-86: Rename the method parameter StripForListView to camelCase
stripForListView in BookService.getBookDTOs and update all internal usages in
that method (calls to bookQueryService.getAllBooks and
bookQueryService.getAllBooksByLibraryIds) to use stripForListView; also update
any call sites of BookService.getBookDTOs to pass the renamed parameter name so
the signature matches callers and preserves functionality.
In `@booklore-api/src/test/java/org/booklore/service/book/BookServiceTest.java`:
- Around line 93-104: Add a new unit test that mirrors
getBookDTOs_adminUser_returnsBooksWithProgress but for the non-admin path: set
authenticationService.getAuthenticatedUser() to a non-admin user (or mock
isAdmin=false), stub bookQueryService.getAllBooksByLibraryIds(anySet(),
anyBoolean(), anyBoolean()) to return a List<Book> and stub
readingProgressService.fetchUserProgress(...) as needed, call
bookService.getBookDTOs(includeDescription, stripForListView) with the same
boolean args, assert the returned list and verify
bookQueryService.getAllBooksByLibraryIds(...) was invoked with the expected
library id set and the stripForListView flag (the new second boolean), and
ensure readingProgressService.fetchUserProgress(...) is also verified; use the
same helper objects (Book, UserBookProgressEntity, testUser variants) and method
names from BookServiceTest to locate where to add the test.
In `@CHANGELOG.md`:
- Around line 7-14: Add a changelog entry documenting the new stripForListView
query parameter on GET /api/v1/books introduced in 2.3.0: update CHANGELOG.md to
include a line under the appropriate section (e.g., Bug Fixes or API Notes) that
mentions the new stripForListView parameter, its default value
(stripForListView=true), and the behavioral impact (preserves metadata for
frontend filtering when set to false) so API consumers are aware of the change;
reference the endpoint GET /api/v1/books and the parameter name stripForListView
in the entry.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 49209b30-1d90-4932-9a29-79c1fb078e69
📒 Files selected for processing (6)
CHANGELOG.mdbooklore-api/src/main/java/org/booklore/controller/BookController.javabooklore-api/src/main/java/org/booklore/service/book/BookQueryService.javabooklore-api/src/main/java/org/booklore/service/book/BookService.javabooklore-api/src/test/java/org/booklore/service/book/BookServiceTest.javabooklore-ui/src/app/features/book/service/book.service.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
booklore-api/src/**/*.java
📄 CodeRabbit inference engine (AGENTS.md)
booklore-api/src/**/*.java: Use 4-space indentation in Java files and match surrounding Java style
Prefer constructor injection via Lombok patterns already used in the codebase. Do not introduce@Autowiredfield injection
Use MapStruct for entity/DTO mapping
Files:
booklore-api/src/test/java/org/booklore/service/book/BookServiceTest.javabooklore-api/src/main/java/org/booklore/controller/BookController.javabooklore-api/src/main/java/org/booklore/service/book/BookQueryService.javabooklore-api/src/main/java/org/booklore/service/book/BookService.java
booklore-api/src/test/**/*.java
📄 CodeRabbit inference engine (AGENTS.md)
Prefer focused unit tests; use
@SpringBootTestonly when the Spring context is required
Files:
booklore-api/src/test/java/org/booklore/service/book/BookServiceTest.java
🧠 Learnings (2)
📚 Learning: 2026-03-26T01:46:48.863Z
Learnt from: CR
Repo: grimmory-tools/grimmory PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-26T01:46:48.863Z
Learning: Applies to booklore-api/src/test/**/*.java : Prefer focused unit tests; use `SpringBootTest` only when the Spring context is required
Applied to files:
booklore-api/src/test/java/org/booklore/service/book/BookServiceTest.java
📚 Learning: 2026-03-26T01:46:48.863Z
Learnt from: CR
Repo: grimmory-tools/grimmory PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-26T01:46:48.863Z
Learning: Applies to booklore-api/src/**/*.java : Use MapStruct for entity/DTO mapping
Applied to files:
booklore-api/src/test/java/org/booklore/service/book/BookServiceTest.java
🔇 Additional comments (1)
booklore-api/src/main/java/org/booklore/controller/BookController.java (1)
68-75: LGTM! API endpoint correctly updated with new configurable parameter.The changes are well-implemented:
- New
stripForListViewparameter with sensible default (true) preserves backward compatibility.- OpenAPI documentation clearly describes the parameter's purpose.
- Both parameters correctly passed to the service layer.
…ip-fields # Conflicts: # booklore-api/src/main/java/org/booklore/service/book/BookService.java # frontend/src/app/features/book/service/book.service.ts
balazs-szucs
left a comment
There was a problem hiding this comment.
Thank you, looks good.
…ausing issues with filtering. (grimmory-tools#250) * chore(release): 2.3.0 [skip ci] ## [2.3.0](grimmory-tools/grimmory@v2.2.6...v2.3.0) (2026-03-21) ### Features * **release:** document develop-based stable release previews ([930e526](grimmory-tools@930e526)) ### Bug Fixes * **api:** fix potential memory leaks in file processing ([031e8ae](grimmory-tools@031e8ae)) * **ci:** correct artifact download action pin ([37ca101](grimmory-tools@37ca101)) * **ci:** publish PR test results from workflow_run ([11a76bf](grimmory-tools@11a76bf)) * **ci:** repair release preview and test result publishing ([afa5b81](grimmory-tools@afa5b81)) * drop telemetry from app ([grimmory-tools#52](grimmory-tools#52)) ([4d82cb7](grimmory-tools@4d82cb7)) * **ui:** repair frontend compile after rebrand ([fea1ec6](grimmory-tools@fea1ec6)) ### Refactors * **build:** rename frontend dist output to grimmory ([ecf388f](grimmory-tools@ecf388f)) * **i18n:** rename booklore translation keys to grimmory ([eb94afa](grimmory-tools@eb94afa)) * **metadata:** move default parser from Amazon to Goodreads ([e252122](grimmory-tools@e252122)) * pull kepubify & ffprobe during build ([grimmory-tools#50](grimmory-tools#50)) ([1c15629](grimmory-tools@1c15629)) * **ui:** rebrand frontend surfaces to grimmory ([d786dd8](grimmory-tools@d786dd8)) ### Chores * **api:** remove the custom startup banner ([98c9b1a](grimmory-tools@98c9b1a)) * **deps:** bump flatted from 3.4.1 to 3.4.2 in /booklore-ui ([grimmory-tools#73](grimmory-tools#73)) ([c4bd0c7](grimmory-tools@c4bd0c7)) * **funding:** point support links at opencollective ([55c0ac0](grimmory-tools@55c0ac0)) * **release:** 2.2.7 [skip ci] ([0b5e24c](grimmory-tools@0b5e24c)) * remove old verbose PR template, replace with temporary more low-key one. ([grimmory-tools#84](grimmory-tools#84)) ([b868526](grimmory-tools@b868526)) * **ui:** drop financial support dialog ([grimmory-tools#21](grimmory-tools#21)) ([62be6b1](grimmory-tools@62be6b1)) ### Documentation * updated supported file formats in README.md ([grimmory-tools#68](grimmory-tools#68)) ([f912e80](grimmory-tools@f912e80)) ### Style * **i18n:** normalize translation json formatting ([grimmory-tools#89](grimmory-tools#89)) ([857290d](grimmory-tools@857290d)) * **ui:** simplify the topbar logo branding ([0416d48](grimmory-tools@0416d48)) * Fix backend from stripping fields * Strip metadata fields by default in backend * Fix merge conflicts * Revert yarn.lock change --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ausing issues with filtering. (grimmory-tools#250) * chore(release): 2.3.0 [skip ci] ## [2.3.0](grimmory-tools/grimmory@v2.2.6...v2.3.0) (2026-03-21) ### Features * **release:** document develop-based stable release previews ([930e526](grimmory-tools@930e526)) ### Bug Fixes * **api:** fix potential memory leaks in file processing ([031e8ae](grimmory-tools@031e8ae)) * **ci:** correct artifact download action pin ([37ca101](grimmory-tools@37ca101)) * **ci:** publish PR test results from workflow_run ([11a76bf](grimmory-tools@11a76bf)) * **ci:** repair release preview and test result publishing ([afa5b81](grimmory-tools@afa5b81)) * drop telemetry from app ([grimmory-tools#52](grimmory-tools#52)) ([4d82cb7](grimmory-tools@4d82cb7)) * **ui:** repair frontend compile after rebrand ([fea1ec6](grimmory-tools@fea1ec6)) ### Refactors * **build:** rename frontend dist output to grimmory ([ecf388f](grimmory-tools@ecf388f)) * **i18n:** rename booklore translation keys to grimmory ([eb94afa](grimmory-tools@eb94afa)) * **metadata:** move default parser from Amazon to Goodreads ([e252122](grimmory-tools@e252122)) * pull kepubify & ffprobe during build ([grimmory-tools#50](grimmory-tools#50)) ([1c15629](grimmory-tools@1c15629)) * **ui:** rebrand frontend surfaces to grimmory ([d786dd8](grimmory-tools@d786dd8)) ### Chores * **api:** remove the custom startup banner ([98c9b1a](grimmory-tools@98c9b1a)) * **deps:** bump flatted from 3.4.1 to 3.4.2 in /booklore-ui ([grimmory-tools#73](grimmory-tools#73)) ([c4bd0c7](grimmory-tools@c4bd0c7)) * **funding:** point support links at opencollective ([55c0ac0](grimmory-tools@55c0ac0)) * **release:** 2.2.7 [skip ci] ([0b5e24c](grimmory-tools@0b5e24c)) * remove old verbose PR template, replace with temporary more low-key one. ([grimmory-tools#84](grimmory-tools#84)) ([b868526](grimmory-tools@b868526)) * **ui:** drop financial support dialog ([grimmory-tools#21](grimmory-tools#21)) ([62be6b1](grimmory-tools@62be6b1)) ### Documentation * updated supported file formats in README.md ([grimmory-tools#68](grimmory-tools#68)) ([f912e80](grimmory-tools@f912e80)) ### Style * **i18n:** normalize translation json formatting ([grimmory-tools#89](grimmory-tools#89)) ([857290d](grimmory-tools@857290d)) * **ui:** simplify the topbar logo branding ([0416d48](grimmory-tools@0416d48)) * Fix backend from stripping fields * Strip metadata fields by default in backend * Fix merge conflicts * Revert yarn.lock change --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ausing issues with filtering. (#250) * chore(release): 2.3.0 [skip ci] ## [2.3.0](v2.2.6...v2.3.0) (2026-03-21) ### Features * **release:** document develop-based stable release previews ([930e526](930e526)) ### Bug Fixes * **api:** fix potential memory leaks in file processing ([031e8ae](031e8ae)) * **ci:** correct artifact download action pin ([37ca101](37ca101)) * **ci:** publish PR test results from workflow_run ([11a76bf](11a76bf)) * **ci:** repair release preview and test result publishing ([afa5b81](afa5b81)) * drop telemetry from app ([#52](#52)) ([4d82cb7](4d82cb7)) * **ui:** repair frontend compile after rebrand ([fea1ec6](fea1ec6)) ### Refactors * **build:** rename frontend dist output to grimmory ([ecf388f](ecf388f)) * **i18n:** rename booklore translation keys to grimmory ([eb94afa](eb94afa)) * **metadata:** move default parser from Amazon to Goodreads ([e252122](e252122)) * pull kepubify & ffprobe during build ([#50](#50)) ([1c15629](1c15629)) * **ui:** rebrand frontend surfaces to grimmory ([d786dd8](d786dd8)) ### Chores * **api:** remove the custom startup banner ([98c9b1a](98c9b1a)) * **deps:** bump flatted from 3.4.1 to 3.4.2 in /booklore-ui ([#73](#73)) ([c4bd0c7](c4bd0c7)) * **funding:** point support links at opencollective ([55c0ac0](55c0ac0)) * **release:** 2.2.7 [skip ci] ([0b5e24c](0b5e24c)) * remove old verbose PR template, replace with temporary more low-key one. ([#84](#84)) ([b868526](b868526)) * **ui:** drop financial support dialog ([#21](#21)) ([62be6b1](62be6b1)) ### Documentation * updated supported file formats in README.md ([#68](#68)) ([f912e80](f912e80)) ### Style * **i18n:** normalize translation json formatting ([#89](#89)) ([857290d](857290d)) * **ui:** simplify the topbar logo branding ([0416d48](0416d48)) * Fix backend from stripping fields * Strip metadata fields by default in backend * Fix merge conflicts * Revert yarn.lock change --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ausing issues with filtering. (#250) * chore(release): 2.3.0 [skip ci] ## [2.3.0](v2.2.6...v2.3.0) (2026-03-21) ### Features * **release:** document develop-based stable release previews ([930e526](930e526)) ### Bug Fixes * **api:** fix potential memory leaks in file processing ([031e8ae](031e8ae)) * **ci:** correct artifact download action pin ([37ca101](37ca101)) * **ci:** publish PR test results from workflow_run ([11a76bf](11a76bf)) * **ci:** repair release preview and test result publishing ([afa5b81](afa5b81)) * drop telemetry from app ([#52](#52)) ([4d82cb7](4d82cb7)) * **ui:** repair frontend compile after rebrand ([fea1ec6](fea1ec6)) ### Refactors * **build:** rename frontend dist output to grimmory ([ecf388f](ecf388f)) * **i18n:** rename booklore translation keys to grimmory ([eb94afa](eb94afa)) * **metadata:** move default parser from Amazon to Goodreads ([e252122](e252122)) * pull kepubify & ffprobe during build ([#50](#50)) ([1c15629](1c15629)) * **ui:** rebrand frontend surfaces to grimmory ([d786dd8](d786dd8)) ### Chores * **api:** remove the custom startup banner ([98c9b1a](98c9b1a)) * **deps:** bump flatted from 3.4.1 to 3.4.2 in /booklore-ui ([#73](#73)) ([c4bd0c7](c4bd0c7)) * **funding:** point support links at opencollective ([55c0ac0](55c0ac0)) * **release:** 2.2.7 [skip ci] ([0b5e24c](0b5e24c)) * remove old verbose PR template, replace with temporary more low-key one. ([#84](#84)) ([b868526](b868526)) * **ui:** drop financial support dialog ([#21](#21)) ([62be6b1](62be6b1)) ### Documentation * updated supported file formats in README.md ([#68](#68)) ([f912e80](f912e80)) ### Style * **i18n:** normalize translation json formatting ([#89](#89)) ([857290d](857290d)) * **ui:** simplify the topbar logo branding ([0416d48](0416d48)) * Fix backend from stripping fields * Strip metadata fields by default in backend * Fix merge conflicts * Revert yarn.lock change --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Description
For a while, the backend would automatically strip all the metadata fields from the books API endpoint.
This caused issues with filtering, because metadata information was removed from the API response, the frontend couldn't properly filter the correct books, especially with magic shelves.
Linked Issue: Fixes an issue from the Booklore repo, but I can't be bothered to recreate the issue, sorry.
Changes
I separated the
withDescriptionboolean from thestripListForViewboolean. Previously, thestripListForViewwas dependent on the value ofwithDescription, and becausewithDescriptionwas always false,stripListForViewwould be true (thus stripping the metadata fields).Now there's a new (optional) parameter for the books API endpoint, namely
stripListForViewwhich by default is true. If it's true, then the metadata fields will be stripped from the API response (thus saving response size with a couple of bytes) and if it's false, then the metadata fields will be left intact (for frontend filtering).Summary by CodeRabbit
Release Notes
stripForListViewquery parameter for the book list endpoint, enabled by default. This new parameter controls which metadata fields are included in API responses, allowing the server to automatically exclude unnecessary fields and optimize list view performance. Clients can disable it when complete book details are required.