Skip to content

Conversation

@lcomplete
Copy link
Owner

What's Changed

New Features

  • Batch Organizing: Implement batch organizing functionality for library pages
  • SmartMoment Enhancement: Add tooltip support to SmartMoment component
  • MagazineItem Enhancement: Add pageListSort prop to MagazineItem
  • Content Type Tagging: Add content type tagging for file naming and adjust filename length for tweets
  • UI Improvement: Reorder icons in Communication section for improved organization

Commits

  • feat: add pageListSort prop to MagazineItem and enhance SmartMoment with tooltip support
  • feat: Implement batch organizing functionality for library pages
  • feat: add content type tagging for file naming and adjust filename length for tweets
  • feat: reorder icons in Communication section for improved organization

Full Changelog: v0.5.4...dev

- 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.
@lcomplete lcomplete changed the title Release v0.5.5 feat: Implement batch organizing functionality for library pages Jan 20, 2026
@augmentcode
Copy link

augmentcode bot commented Jan 20, 2026

🤖 Augment PR Summary

Summary: 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:

  • Adds batch organize UI in Library settings (filter preview + dialog) and supporting client API calls.
  • Introduces server endpoints/services/DTOs for batch filtering and moving pages across collections.
  • Enhances SmartMoment with tooltip support, and threads sort context into MagazineItem so timestamps are labeled.
  • Updates library export to include a content-type tag in filenames and shortens tweet filename snippets.
  • Reorders/adjusts icons in the IconPicker Communication section.
  • Keeps English/Chinese READMEs’ roadmap items in sync and documents this guideline in AGENTS/CLAUDE docs.

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 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 5 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

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;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filterPages() trusts query.getPage()/query.getSize(); if size <= 0 (or page < 0) this can trigger division-by-zero / PageRequest.of(...) exceptions and return 500s. Consider validating/clamping page/size (and query itself) before building the PageRequest.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

}

private BatchMoveResult batchMoveByFilter(BatchMoveRequest request) {
BatchFilterQuery query = request.getFilterQuery();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In batchMoveByFilter, request.getFilterQuery() can be null (malformed client / direct API call), which would NPE in buildSpecification(query). Consider rejecting the request when selectAll is true but filterQuery is missing.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

.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));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Fix This in Augment

🤖 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);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When filterPages(...) fails, the dialog only console.errors; from the UI it will look like an empty result set with no explanation. Consider surfacing the failure via enqueueSnackbar(...) (and/or clearing result) so users know the load failed.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎


/**
* How to set the collectedAt timestamp.
* Values: KEEP (keep original), UPDATE_NOW (set to current time),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BatchMoveRequest.collectedAtMode Javadoc lists UPDATE_NOW / field-name modes, but the implementation in BatchOrganizeService currently checks for USE_PUBLISH_TIME. Consider updating the comment to match the supported values to avoid API-contract confusion.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

@lcomplete lcomplete merged commit 62a2f27 into main Jan 20, 2026
1 check 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.

2 participants