Conversation
- Added BatchOrganizeDialog component for selecting and moving pages between collections. - Introduced BatchOrganizeSetting component to filter and initiate batch moves. - Created BatchOrganizeController to handle API requests for filtering and moving pages. - Developed BatchOrganizeService to manage business logic for batch operations. - Implemented DTOs for batch filtering and moving requests/responses. - Enhanced PageRepository with batch update methods for collection management. - Updated PageService to handle library save status changes and timestamps. - Added pagination and selection features for improved user experience in batch operations.
…ith tooltip support
🤖 Augment PR SummarySummary: This PR prepares the v0.5.5 release by adding batch organizing tools for the library, improving timestamp UX, and refining export/file naming. Changes:
Technical Notes: Batch operations support pagination + “select all” semantics, and backend move logic uses bulk updates (CriteriaUpdate / repository update queries) with optional collected-time remapping. 🤖 Was this summary useful? React with 👍 or 👎 |
| public BatchFilterResult filterPages(BatchFilterQuery query) { | ||
| Specification<Page> spec = buildSpecification(query); | ||
| int page = query.getPage() != null ? query.getPage() : 0; | ||
| int size = query.getSize() != null ? query.getSize() : DEFAULT_PAGE_SIZE; |
There was a problem hiding this comment.
| } | ||
|
|
||
| private BatchMoveResult batchMoveByFilter(BatchMoveRequest request) { | ||
| BatchFilterQuery query = request.getFilterQuery(); |
There was a problem hiding this comment.
| .predicate(StringUtils.isNotBlank(query.getAuthor()), buildAuthorSpec(query.getAuthor())) | ||
| // Date range filter (always use createdAt) | ||
| .ge(StringUtils.isNotBlank(query.getStartDate()), "createdAt", convertDateToInstant(query.getStartDate(), 0)) | ||
| .lt(StringUtils.isNotBlank(query.getEndDate()), "createdAt", convertDateToInstant(query.getEndDate(), 1)); |
There was a problem hiding this comment.
The date predicates call convertDateToInstant(...), which returns null on parse failure; the underlying GeSpecification/LtSpecification don’t handle null compares and will throw at runtime. Consider only adding the createdAt bounds when parsing succeeds (or validate startDate/endDate upfront).
🤖 Was this useful? React with 👍 or 👎
| const data = await filterPages({ ...filterQuery, page: currentPage, size: PAGE_SIZE }); | ||
| setResult(data); | ||
| } catch (error) { | ||
| console.error("Failed to load pages:", error); |
There was a problem hiding this comment.
|
|
||
| /** | ||
| * How to set the collectedAt timestamp. | ||
| * Values: KEEP (keep original), UPDATE_NOW (set to current time), |
There was a problem hiding this comment.
…ling and pagination validation
What's Changed
New Features
Commits
Full Changelog: v0.5.4...dev