Skip to content

feat(news): add RSSHub presets for CLS, Gelonghui and Jin10 - #1386

Open
2233admin wants to merge 1 commit into
TraderAlice:devfrom
2233admin:feat/chinese-news-rsshub-presets
Open

feat(news): add RSSHub presets for CLS, Gelonghui and Jin10#1386
2233admin wants to merge 1 commit into
TraderAlice:devfrom
2233admin:feat/chinese-news-rsshub-presets

Conversation

@2233admin

Copy link
Copy Markdown

Summary

Add opt-in RSSHub presets for 财联社 (CLS telegraph), 格隆汇 (Gelonghui live news), and 金十数据 (Jin10 market news) to Settings → News Sources.

Users supply an RSSHub instance URL reachable from the Alice backend, then add any of the three presets as ordinary RSS subscriptions. OpenAlice does not install or supervise RSSHub, does not depend on a public instance, and does not enable these feeds by default.

Behavior and boundaries

  • Preserve reverse-proxy path prefixes and normalize trailing slashes when constructing feed URLs.
  • Reject non-HTTP(S) URLs, embedded credentials, query strings, and fragments.
  • Keep existing subscriptions and disabled-source choices; do not duplicate an existing source tag.
  • Explain that the instance field is an add-time input, that changing it does not rewrite existing feeds, and that Alice needs a restart to load changed subscriptions.
  • Reuse the existing feed schema, config API, collector, JSONL store, and query API. No persisted-shape change, migration, dependency, or backend endpoint.
  • Reuse shared form/Button primitives with labeled fields, accessible validation, and narrow-screen stacked controls.
  • Document pinned local RSSHub deployment, remote/container networking, lifecycle, and provider-content limits in the existing project structure guide.

Verification

Executed against this isolated feature branch, based on dev commit 7fdf5ca:

  • pnpm --package=node@22.23.2 dlx node scripts/run-tests.mjs --changed origin/dev — 4 files, 59 tests passed.
  • pnpm --package=node@22.23.2 dlx node scripts/run-tests.mjs --owner ui --path ui/src/demo/handlers/configNews.spec.ts — 3 tests passed; existing demo handlers round-trip the unchanged feed shape.
  • pnpm --package=node@22.23.2 dlx node node_modules/typescript/bin/tsc -b ui — passed.
  • git diff --check — passed before commit.
  • Real /settings/news-collector route in dev:demo: invalid URL error, all three preset additions, saved config payload, existing-feed preservation, added-state buttons; desktop and 390px viewport checked, no document horizontal overflow.
  • Passed the three URLs produced by the browser form into the real NewsCollector and NewsCollectorStore, using temporary isolated storage and a real self-hosted RSSHub. Received CLS 20, Gelonghui 15, Jin10 21 items (56 total). Source-filtered HTTP handlers returned the corresponding stored items. Second collection and collection after storage reload added zero duplicates. Temporary storage removed afterward.
  • Live RSSHub image: diygod/rsshub@sha256:0c36f939df98144fc2cbba1c5d7feefbc1675cc6ad5e99544fa1c77ac84a4e0d.

Limits and environment notes

  • Live counts are point-in-time evidence, not fixtures or availability guarantees. During acceptance, CLS/Jin10 feeds omitted article links; one Jin10 item had a title but an empty body. The existing optional-field contract is preserved; no content or links are fabricated.
  • Public rsshub.app endpoints returned HTTP 403 in the earlier local investigation; this is why no public instance is shipped as a default.
  • System Node 26.3.1 caused the unchanged TabHost test to fail on unavailable global localStorage. The same changed-file closure passed on CI's Node 22 major; no unrelated runtime/test changes are included.
  • The workstation-mandated cargo test --workspace --no-fail-fast was attempted from the feature checkout root and could not run because this TypeScript repository has no Cargo.toml. It is not reported as passing.
  • Full monorepo tests were not run: this is a leaf UI change plus its owner documentation; the changed-file closure, demo contract, owning typecheck, and real feed acceptance were exercised.

RSSHub implementation references: CLS, Gelonghui, Jin10.

This PR is independent of #1383 and contains none of the unrelated changes in the original local working tree.

@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the luokerenx4's Team Team on Vercel.

A member of the Team first needs to authorize it.

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