Skip to content

feat(english/webnovel): add fanfic browse and A-Z tag filter - #2756

Open
tmfahad39 wants to merge 1 commit into
lnreader:masterfrom
tmfahad39:feat/english-webnovel-fanfic-tags
Open

tmfahad39 wants to merge 1 commit into
lnreader:masterfrom
tmfahad39:feat/english-webnovel-fanfic-tags

Conversation

@tmfahad39

Copy link
Copy Markdown
Contributor

Description

  • Adds a Browse picker to select between Novels and Fanfics (browses /stories/fanfic with the selected sort order)
  • Adds a Tag (A-Z browse) picker listing all 82 tags currently indexed on webnovel.com/tags, sorted A-Z; selected tags browse the tag's /tags/{tag}-novel page via a new .g_book_item parser
  • Version bumped webnovel.ts from 1.0.3 to 1.1.0

Testing

  • Verified live against webnovel.com:
    • Tag browse (/tags/academy-novel?pageIndex=1 & pageIndex=2 returning 20 items per page)
    • Fanfic browse (/stories/fanfic?orderBy=1&pageIndex=1)
    • Fanfic keyword search
    • Popular/search/latest/parseNovel/parseChapter
  • Linter and Prettier checks passed clean.

- Add a Browse picker (Novels/Fanfics); Fanfics browses /stories/fanfic
  with the selected sort, complementing the existing fanfic keyword search
- Add a Tag picker listing all 82 tags currently indexed on
  webnovel.com/tags, sorted A-Z; selected tags browse the tag's
  /tags/{tag}-novel page via a new .g_book_item parser
- Verified live: tag browse (20 items, paginates), fanfic browse,
  fanfic keyword search, popular/search/latest/parseNovel/parseChapter

Co-Authored-By: opencode@Anomalyco
@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 2/5

[Medium impact] The changes affect the Webnovel source’s browse workflow.

Fix the tag initialization, required picker default, and Latest ordering before merging.

Findings

  1. P1 Tag options initialize too late ▶
  2. P1 Tag picker lacks required default ▶
  3. P1 Latest shows the wrong order ▶
  4. P2 Selected tags cannot be cleared ▶

Summary

Adds fanfic browsing and an A–Z tag picker to Webnovel, with a separate parser for tag pages. Bumps the plugin to 1.1.0.

  • Webnovel readers can browse novels by tag.
  • Webnovel readers can browse fanfics by sort order.

Reviews (1) · Last reviewed commit: "feat(english/webnovel): add fanfic brows..." · Reviewed by Greptile

},
tag: {
label: 'Tag (A-Z browse)',
options: TAG_OPTIONS,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Tag options initialize too late

export default new Webnovel() reads TAG_OPTIONS before the array is initialized below it. In development, importing the plugin throws a ReferenceError. The ES5 build instead captures undefined in filters.tag.options, so opening the filters fails at options.map. Move TAG_OPTIONS above the instance creation.

Comment on lines +398 to +402
tag: {
label: 'Tag (A-Z browse)',
options: TAG_OPTIONS,
type: FilterTypes.Picker,
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Tag picker lacks required default

The new tag picker has no value, but Filters requires a string value for every picker. This makes filters fail its satisfies Filters check and the class's PluginBase contract. Add an explicit default, such as value: '0', matching the existing no-tag check.

Suggested change
tag: {
label: 'Tag (A-Z browse)',
options: TAG_OPTIONS,
type: FilterTypes.Picker,
},
tag: {
label: 'Tag (A-Z browse)',
value: '0',
options: TAG_OPTIONS,
type: FilterTypes.Picker,
},

},
tag: {
label: 'Tag (A-Z browse)',
options: TAG_OPTIONS,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Selected tags cannot be cleared

The tag picker has no “All” or empty option. After choosing a tag, users must reset every filter to clear it. Changing Browse to Fanfics still returns the tag page because the tag branch runs first. Add a no-tag option with value: '0', which the route already supports.

Suggested change
options: TAG_OPTIONS,
options: [{ label: 'All', value: '0' }, ...TAG_OPTIONS],

filters,
}: Plugin.PopularNovelsOptions<typeof this.filters>,
): Promise<Plugin.NovelItem[]> {
const sort = filters?.sort?.value || '1';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Latest shows the wrong order

The new tag and fanfic branches return before checking showLatestNovels. When users select either mode and then switch to Latest, the saved sort remains in effect—orderBy=1 by default—instead of the existing latest order, 5. Honor showLatestNovels when choosing the order in both branches.

This branch has not been deployed

No deployments
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.

1 participant