Skip to content

feat: Quick Add article with RSS auto-discovery #minor - #12

Merged
jgordijn merged 2 commits into
mainfrom
add-single-article
Mar 4, 2026
Merged

jgordijn merged 2 commits into
mainfrom
add-single-article

Conversation

@jgordijn

@jgordijn jgordijn commented Mar 4, 2026

Copy link
Copy Markdown
Owner

What

Add a Quick Add button (blue "+" FAB) on the feed view to paste a single article URL. The article is fetched, added to the feed, and summarized by AI — all without creating a full RSS resource.

RSS auto-discovery

When adding an article, the backend checks the site for RSS feeds (<link rel="alternate"> tags). If found, the modal shows:

  • Feed URL as a clickable link (opens in new tab)
  • Last 5 articles as clickable links with published dates
  • Three options: Add RSS (auto-subscribe), Edit (pre-filled resource form), No thanks

Implementation details

  • Backend: POST /api/quick-add (fetch + create entry + discover RSS) and POST /api/quick-add/subscribe (create RSS resource)
  • Frontend: QuickAddModal.svelte with 3 states (input → result → edit), FAB on feed view
  • System resource: Auto-created quickadd type resource parents one-off entries, hidden from resource management, skipped by scheduler
  • Discovery: internal/engine/discovery.go parses feed links from article page with site-root fallback

Files changed

  • cmd/knowledgehub/collections.go — quickadd type + migration + ensureQuickAddResource
  • cmd/knowledgehub/main.go — register quick-add routes
  • internal/engine/discovery.go + tests — RSS/Atom/JSON Feed auto-discovery
  • internal/engine/scheduler.go — exclude quickadd from scheduled fetches
  • internal/routes/quickadd.go + tests — quick-add and subscribe endpoints
  • internal/testutil/testutil.go — add quickadd to test schema
  • ui/src/lib/components/QuickAddModal.svelte — modal component
  • ui/src/routes/+page.svelte — FAB button + modal integration
  • ui/src/routes/resources/+page.svelte — filter out quickadd resources

Tests

All existing + new tests pass (go test ./internal/... -count=1)

jgordijn added 2 commits March 4, 2026 12:02
- Add Quick Add button (FAB) on feed view to paste a single article URL
- Backend: POST /api/quick-add extracts article via readability, creates
  entry under system 'Quick Add' resource, discovers RSS feeds
- Backend: POST /api/quick-add/subscribe creates RSS resource from
  discovered feed
- RSS auto-discovery: parses <link rel='alternate'> tags from article
  page and site root, fetches last 5 feed articles as preview
- QuickAddModal with 3 states: URL input → result with RSS preview →
  optional resource edit form
- RSS preview shows 5 articles as clickable links with dates, feed URL
  as external link, and 3 options: Add RSS / Edit / No thanks
- System 'Quick Add' resource (type=quickadd) auto-created on startup,
  hidden from resource management page, skipped by scheduler
- Full test coverage for discovery and quick-add endpoints
@jgordijn
jgordijn enabled auto-merge (squash) March 4, 2026 12:56
@jgordijn
jgordijn merged commit 85e6272 into main Mar 4, 2026
1 check passed
@jgordijn
jgordijn deleted the add-single-article branch March 4, 2026 12:57
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