Skip to content

Add icon source option for HTML RSS recipes - #870

Draft
Colin-XKL wants to merge 1 commit into
devfrom
cursor/html-to-rss-icon-source-dev-ed37
Draft

Add icon source option for HTML RSS recipes#870
Colin-XKL wants to merge 1 commit into
devfrom
cursor/html-to-rss-icon-source-dev-ed37

Conversation

@Colin-XKL

@Colin-XKL Colin-XKL commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add feed_meta.icon_source support for HTML RSS recipes.
  • Extract page favicon links automatically and support a generic favicon service URL.
  • Add an icon source selector to the HTML to RSS wizard.

Walkthrough

html_to_rss_icon_source_toggle.mp4

Testing

  • go test ./...
  • task backend-build
  • task frontend-build (passes; existing Browserslist/eval warnings remain)
  • Manual UI verification in the HTML to RSS wizard

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

Summary by Sourcery

Add configurable feed icon source handling for HTML-based RSS recipes, including automatic icon extraction and favicon service support.

New Features:

  • Support configuring feed icon source via FeedMetaConfig, including automatic extraction and a generic favicon service option.
  • Automatically extract feed icon URLs from HTML link tags when parsing HTML sources.
  • Expose an icon source selector in the HTML to RSS wizard UI with localized labels.

Enhancements:

  • Normalize HTML feed titles by trimming whitespace and ensure feed image URLs and titles are derived consistently from page metadata or site origin.

Tests:

  • Add unit tests covering feed icon source behavior in the pipeline, including auto, favicon service, and fallback scenarios.
  • Add unit test verifying HTML parser extraction of feed icon links.

Co-authored-by: Colin <Colin_XKL@outlook.com>
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
feed-craft-admin Ready Ready Preview, Comment Jul 28, 2026 11:07am
feed-craft-doc Ready Ready Preview, Comment Jul 28, 2026 11:07am

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@sourcery-ai

sourcery-ai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Implements configurable icon source handling for HTML-to-RSS feeds, including auto favicon extraction, an optional Google favicon service, and corresponding UI and config wiring with tests.

File-Level Changes

Change Details Files
Add configurable icon source resolution in the pipeline when normalizing feeds.
  • Introduce FeedIconSourceAuto and FeedIconSourceFaviconService constants and IconSource field on FeedMetaConfig.
  • Add applyFeedIconSource to PipelineSource to resolve the final feed.ImageURL/ImageTitle based on icon source, explicit image URL, and fallback rules.
  • Implement helper functions buildFaviconServiceURL and firstOrigin to construct favicon service URLs and derive site origins.
internal/config/source_config.go
internal/source/pipeline.go
Automatically extract favicon URLs from HTML when parsing HTML-to-RSS feeds.
  • Trim whitespace from parsed <title> text for feed titles.
  • Add extractFeedIconURL to scan tags for icon-related rel values and capture the first non-empty href.
  • Populate feed.ImageURL and feed.ImageTitle from extracted icon data during HTML parsing.
internal/source/parser/html_parser.go
Expose icon source selection in the HTML to RSS wizard and wire it through to backend config.
  • Add an icon source radio group to step 3 of the HTML-to-RSS wizard, allowing Auto vs Favicon Service selection.
  • Initialize feedMeta.icon_source with a default of 'auto' and include it when building the recipe payload.
  • Add localized strings for the new icon-source fields and help text in English and Chinese.
web/admin/src/views/dashboard/html_to_rss/html_to_rss.vue
web/admin/src/locale/en-US/htmlToRss.ts
web/admin/src/locale/zh-CN/htmlToRss.ts
Add tests covering icon source behavior in the pipeline and HTML parser.
  • Test auto icon handling with relative image URLs and title-based ImageTitle population.
  • Test favicon service mode overriding any existing image URL with a Google favicon service URL derived from the feed origin.
  • Test auto-mode favicon.ico fallback only when an explicit icon source is configured.
  • Test that no favicon fallback occurs when no explicit icon source is configured.
  • Test HTML parser behavior for extracting favicon links and setting feed title and image fields.
internal/source/pipeline_test.go
internal/source/parser/html_parser_test.go

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

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