Skip to content

Validate RSS feed URLs before saving - #756

Merged
luokerenx4 merged 1 commit into
devfrom
codex/news-feed-url-validation
Jul 29, 2026
Merged

Validate RSS feed URLs before saving#756
luokerenx4 merged 1 commit into
devfrom
codex/news-feed-url-validation

Conversation

@luokerenx4

Copy link
Copy Markdown
Contributor

Summary

  • validate new RSS feed URLs in the News Sources form before submitting
  • show an accessible inline error and keep Add Feed disabled for invalid URLs
  • preserve the existing trim-on-save behavior and add focused component coverage

Why

The production news configuration schema requires z.string().url(), but the UI previously checked only that the field was non-empty. Values such as not-a-url enabled Add Feed and were rejected only after the request reached the server, without any field-level explanation.

User impact

Users now get immediate, actionable feedback while entering a feed URL. A valid URL clears the error and enables submission, so the UI contract matches the production validation boundary.

Verification

  • pnpm exec vitest run ui/src/pages/NewsCollectorPage.spec.tsx — 2 passed
  • npx tsc --noEmit
  • cd ui && npx tsc -b
  • pnpm -F open-alice-ui build:demo
  • pnpm test — 3390 passed, 9 skipped
  • Real Demo route (/settings/news-collector): verified not-a-url shows the inline alert and keeps Add Feed disabled; replacing it with https://example.com/rss.xml clears the alert and enables the button
  • git diff --check

@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)
openalice-demo Ready Ready Preview, Comment Jul 28, 2026 8:59pm

Request Review

@luokerenx4 luokerenx4 added area:settings Settings, configuration, credentials, or permissions theme:safety Correctness, validation, destructive-action, or trading safety workflow:parallel Autonomous parallel contribution; leave open for later acceptance labels Jul 29, 2026 — with ChatGPT Codex Connector
@luokerenx4
luokerenx4 merged commit df80915 into dev Jul 29, 2026
7 checks passed
@luokerenx4
luokerenx4 deleted the codex/news-feed-url-validation branch July 29, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:settings Settings, configuration, credentials, or permissions theme:safety Correctness, validation, destructive-action, or trading safety workflow:parallel Autonomous parallel contribution; leave open for later acceptance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant