Repository navigation
Conversation
…d bodies Co-Authored-By: omp <noreel@local>
[Medium impact] The PR appears safe to merge; no actionable issue was found in the changed code. SummaryUpdates
No actionable issues were found. This review checked the code and related helpers; it did not independently run live-site or Android checks. Reviews (1) · Last reviewed commit: "fix(russian/hexnovels): decode response ..." · Reviewed by Greptile |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hexnovels.me embeds the chapter list in the framework's serialized payload, which is separated by NUL bytes. The app runtime truncates
res.text()at the first NUL, soparseNovelnever reached the chapter data: it returned no chapters, LNReader'sfetchPagethrew, and the novel screen showed "Unable to load novel". The novels list was unaffected because its markup sits before the first NUL.Fix: read the body with
arrayBuffer()and decode UTF-8 manually, dropping the NUL separators. NoTextDecoder/spread, so it stays Hermes-safe. Version 1.0.1 -> 1.0.2.Measured per chapters page (decoded bytes vs what
text()truncation left):Verified:
npm run check:plugin -- plugins/russian/hexnovels.ts->popularNovels40,searchNovels2 results,parseNovel440 chapters,parseChapter205 chars, all PASS.npx eslint plugins/russian/hexnovels.tsclean. Also exercised in LNReader on Android (install from a locally served manifest, novel screen loads, first chapter opens).Illustration-only chapters (e.g. "Том 1. Глава 0: Иллюстрации") contain only images, which the site stores XOR-encrypted on its CDN and decrypts inside its own service worker; there is no plaintext image URL, so the app cannot show them.
parseChapternow returns a notice explaining that and pointing at the WebView action instead of an empty body.Users whose database already holds novel rows cached from the failed loads keep getting "Unable to load novel" until they run Settings -> Advanced -> Clear cached novels (that deletes cached novels that are not in the library; library entries and downloaded chapters are untouched).
Closes #2788.
Co-authored with AI assistance.