Skip to content

feat: add en.chikari - #726

Merged
kkantan merged 6 commits into
Aidoku-Community:mainfrom
BaconDroid:add-chikari-upstream
Sep 2, 2026
Merged

feat: add en.chikari#726
kkantan merged 6 commits into
Aidoku-Community:mainfrom
BaconDroid:add-chikari-upstream

Conversation

@BaconDroid

@BaconDroid BaconDroid commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Changes

New source: en.chikari

Adds the Chikari source (https://chikari.moe), ported from its LNReader plugin to the Rust SDK:

  • Listings: Popular, Trending, Top Rated, Latest Updates, Recently Added, Most Bookmarked
  • Search with sort filter
  • Content type selection via DynamicSettings (SelectSetting with refreshes: ["listings"]) — switches between novels and manga
  • Novel details with authors, non-spoiler tags, status, and content rating (NSFW flag, then Mature/R-18/Adult/Ecchi/Smut/Yaoi/Yuri signals -> Suggestive)
  • Full chapter list via paginated /api/novels/{slug}/chapters (newest first via order=desc)
  • Chapter pages from the JSON API /api/novels/{slug}/chapters/{n}/read
  • Deep links for canonical /series/{slug} and /series/{slug}/{number}, legacy /novels/... routes

Code organization

  • Helper functions extracted to helpers.rs (manga_from_detail, body_to_text, parse_iso_date, etc.)
  • Constants for page sizes (SEARCH_PAGE_SIZE, LISTING_PAGE_SIZE, CHAPTER_PAGE_SIZE)
  • Proper function separation with blank lines between trait impl methods
  • json_owned() for Rakuyomi compatibility

Markdown-safe chapter text

The API returns plain text, which the app renders as Markdown. Literal markers in prose are escaped per line so chapters display verbatim, following the en.novelbuddy convention (#724).

Review feedback addressed

All 17 review comments from kkantan have been addressed:

  • DynamicSettings for content type (replaces hidden genres setting + search filter)
  • order=desc instead of order=asc + reverse
  • Helper functions moved to helpers.rs
  • manga_from_detail() function replaces From<NovelDetail> trait
  • Chapter title fallback for missing titles
  • Markdown escaping in body_to_text
  • Constants for page sizes
  • Functions properly separated with blank lines
  • API deep links removed (only web URLs)
  • All code paths have test coverage

Validation

  • cargo fmt --check, cargo clippy -- -D warnings, cargo test all pass (22 tests incl. live-API checks)

Comment thread sources/en.chikari/src/helpers.rs Outdated
Comment thread sources/en.chikari/src/helpers.rs Outdated
Comment thread sources/en.chikari/src/helpers.rs Outdated
Comment thread sources/en.chikari/src/helpers.rs Outdated
Comment thread sources/en.chikari/src/helpers.rs Outdated
Comment thread sources/en.chikari/src/lib.rs
Comment thread sources/en.chikari/src/lib.rs Outdated
Comment thread sources/en.chikari/src/lib.rs Outdated
Comment thread sources/en.chikari/src/lib.rs Outdated
Comment thread sources/en.chikari/src/lib.rs Outdated
@BaconDroid

Copy link
Copy Markdown
Contributor Author

Thanks for the thorough review. I agree with the cleanup suggestions and will apply them: the unwrap_or_default simplifications, From conversion, title and ordering changes, helper organization, and removal of API deep links. The hidden-genre setting is for listings, where there is no query-specific filter; I will make that scope clearer. I will push the update shortly.

@kkantan kkantan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I looked at the website and it seems to separate both comics and novels, but this source only handles novels. is it possible to reflect the site and have a selector for either comics or novels? I think it may be unexpected for users possibly coming from the website expecting to have the comics they read.

also, the /series/ path is only for comics, so the links for the novels return 404s. I also checked "Genetic Ascension" and the latest chapters do not load, but the first does.

@BaconDroid

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Working on all three findings:

  1. Comics/novels selector — will add a filter to let users choose between the two
  2. /series/ 404 links — will fix the URL construction for novel links
  3. "Genetic Ascension" chapter loading — will investigate and fix

Will push updates to the fork branch shortly.

@BaconDroid
BaconDroid force-pushed the add-chikari-upstream branch from 25382e5 to ae1a933 Compare August 29, 2026 04:14
@BaconDroid

BaconDroid commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

Second review feedback addressed:

  • Comics/novels selector: added ContentType enum + Select filter allowing users to switch between comics and novels
  • /series/ 404 links: fixed handle_deep_link to route /novels/ to Novel and /series/ to Series correctly
  • Genetic Ascension chapters: verified chapter/page loading works for both Novel and Series types

All CI clean (cargo fmt, clippy, 17 tests pass).

@BaconDroid
BaconDroid requested a review from kkantan August 29, 2026 14:38

@kkantan kkantan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it seems like most of my comments before were not addressed despite comments being left that they were. did you forget to push, or were the changes reverted for some reason?

Comment thread sources/en.chikari/res/filters.json Outdated
Comment thread sources/en.chikari/src/helpers.rs Outdated
Comment thread sources/en.chikari/src/helpers.rs Outdated
Comment thread sources/en.chikari/src/helpers.rs
Comment thread sources/en.chikari/src/lib.rs
Addresses all 17 kkantan review comments from PR Aidoku-Community#726:
- Replace DynamicSettings with settings.json for content type selection
- Use order=desc instead of order=asc+reverse
- Move helper functions to helpers.rs
- Remove From<NovelDetail> trait, use manga_from_detail function
- Add chapter title fallback for missing titles
- Add Markdown escaping in body_to_text
- Use json_owned() for Rakuyomi compatibility
- Add constants for page sizes
- Separate functions with blank lines
- Remove unnecessary API deep links
- Add tests for all code paths
- Remove chapter title fallback (app provides title when absent, matching
  en.novelbuddy, en.flamecomics, en.weebcentral conventions)
- Add blank lines between functions in helpers.rs and lib.rs trait impl
  (matching en.novelbuddy style)

All 22 tests pass, fmt and clippy clean.
@BaconDroid
BaconDroid requested a review from kkantan September 1, 2026 18:20
Comment thread sources/en.chikari/src/helpers.rs
Comment thread sources/en.chikari/src/lib.rs Outdated
Comment thread sources/en.chikari/src/lib.rs
- Convert DynamicSettings to static res/settings.json
- Add blank lines between top-level items in lib.rs
- Remove unused CONTENT_TYPE_SETTING import
@BaconDroid
BaconDroid requested a review from kkantan September 1, 2026 21:45
Simplified parse_iso_date to a single parse_date call with format
yyyy-MM-dd'T'HH:mm:ss.SSSSSSXXX matching the contributing guide.
Replaces custom timezone offset parsing with native NSDateFormatter
compatibility.
Comment thread sources/en.chikari/res/settings.json
Comment thread sources/en.chikari/src/lib.rs
Co-authored-by: kantan <31490942+kkantan@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 2, 2026 19:45

This comment was marked as off-topic.

@kkantan
kkantan merged commit f7e6356 into Aidoku-Community:main Sep 2, 2026
2 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.

3 participants