Skip to content

fix(demo): make News Sources configurable - #755

Merged
luokerenx4 merged 1 commit into
devfrom
codex/demo-news-config
Jul 29, 2026
Merged

fix(demo): make News Sources configurable#755
luokerenx4 merged 1 commit into
devfrom
codex/demo-news-config

Conversation

@luokerenx4

Copy link
Copy Markdown
Contributor

What changed

  • add a representative News Collector configuration to the demo /api/config response
  • implement an in-memory /api/config/news mutation handler so enablement, intervals, feed toggles, additions, and removals round-trip during a demo session
  • mirror the production config guard for positive numeric settings, feed shapes, and valid URLs
  • add handler coverage for initial feeds, successful mutation persistence, and invalid URL rejection

Why

The News Sources route used useConfigPage, but the demo config response omitted the entire news section and had no matching PUT handler. The page therefore rendered an empty fallback form, then silently discarded every attempted change: adding a feed cleared the form but left the list empty.

User impact

The public demo now presents a realistic enabled/paused RSS pair and lets users exercise the full News Collector configuration flow. Changes remain available for the current demo session while still following the demo banner's non-persistent contract.

Validation

  • pnpm vitest run ui/src/demo/handlers/configNews.spec.ts ui/src/demo/handlers/configKeys.spec.ts (2 files, 4 tests passed)
  • git diff --check
  • npx tsc --noEmit
  • cd ui && npx tsc -b
  • pnpm test (358 passed, 1 skipped files; 3391 passed, 9 skipped tests)
  • pnpm -F open-alice-ui build:demo
  • real demo walkthrough: News Sources loaded Fed enabled and CoinDesk paused; adding Example Markets produced Saved and a stable 2 of 3 feeds active list

No external RSS fetch was run because this changes only the deterministic demo configuration contract, not the production collector or network parser.

@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:53pm

Request Review

@luokerenx4 luokerenx4 added area:demo Demo runtime, fixtures, handlers, or banner theme:demo Demo fidelity, fixtures, or simulated interactions workflow:parallel Autonomous parallel contribution; leave open for later acceptance labels Jul 29, 2026 — with ChatGPT Codex Connector
@luokerenx4
luokerenx4 marked this pull request as ready for review July 29, 2026 05:37
@luokerenx4
luokerenx4 merged commit a1518ca into dev Jul 29, 2026
7 checks passed
@luokerenx4
luokerenx4 deleted the codex/demo-news-config branch July 29, 2026 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:demo Demo runtime, fixtures, handlers, or banner theme:demo Demo fidelity, fixtures, or simulated interactions 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