Extract pure logic out of RSX components into unit-testable handlers modules #9

Merged
schaefera merged 4 commits from worktree-extract-rsx-logic into main 2026-09-15 09:11:51 +00:00
Collaborator

Summary

  • Splits article_row.rs and subscribe_form.rs into mod.rs + component.rs + handlers.rs, mirroring the existing components/*/ convention, and adds a sibling app/handlers.rs for App's heading computation.
  • Moves small reusable bits out of the RSX/closures into plain functions — score_percent, normalize_feed_url, subscribed_message, feed_heading — each covered by unit tests, so this logic no longer needs a Dioxus runtime to verify.
  • Handler code that's tied to Dioxus signals/component state stays in the component files, per the intent of only pulling out logic that's genuinely reusable/testable on its own.

Test plan

  • cargo test -p feedsignal-web — 9 new unit tests pass
  • cargo clippy -p feedsignal-web --all-features — clean

🤖 Generated with Claude Code

## Summary - Splits `article_row.rs` and `subscribe_form.rs` into `mod.rs` + `component.rs` + `handlers.rs`, mirroring the existing `components/*/` convention, and adds a sibling `app/handlers.rs` for `App`'s heading computation. - Moves small reusable bits out of the RSX/closures into plain functions — `score_percent`, `normalize_feed_url`, `subscribed_message`, `feed_heading` — each covered by unit tests, so this logic no longer needs a Dioxus runtime to verify. - Handler code that's tied to Dioxus signals/component state stays in the component files, per the intent of only pulling out logic that's genuinely reusable/testable on its own. ## Test plan - [x] `cargo test -p feedsignal-web` — 9 new unit tests pass - [x] `cargo clippy -p feedsignal-web --all-features` — clean 🤖 Generated with [Claude Code](https://claude.com/claude-code)
claude-bot added 1 commit 2026-09-15 07:26:20 +00:00
Extract pure logic out of RSX components into unit-testable handlers modules
Some checks failed
CI / check (pull_request) Failing after 21s
CI / test (pull_request) Has been skipped
CI / audit (pull_request) Has been skipped
de6256a812
Splits article_row.rs and subscribe_form.rs into mod.rs + component.rs +
handlers.rs (mirroring the components/*/ convention), and adds a sibling
app/handlers.rs for App's heading computation. RSX now calls into plain
functions (score_percent, normalize_feed_url, subscribed_message,
feed_heading) that are covered by unit tests, instead of computing the
same logic inline where it can't be tested without a Dioxus runtime.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
schaefera added 1 commit 2026-09-15 07:42:13 +00:00
Fix cargo fmt formatting in subscribe_form handlers tests
Some checks failed
CI / check (pull_request) Successful in 1m52s
CI / test (pull_request) Successful in 3m29s
CI / audit (pull_request) Failing after 13s
2ae3293c9d
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
schaefera added 1 commit 2026-09-15 07:50:10 +00:00
Extract subscribe_form's submit-result mapping into a testable outcome
Some checks failed
CI / check (pull_request) Successful in 1m47s
CI / test (pull_request) Successful in 3m30s
CI / audit (pull_request) Failing after 14s
bd086b0288
The submit closure mixed pure decision logic (what should the form show
after subscribe_feed resolves) with Dioxus signal orchestration. Splits
out resolve_submit_outcome(Result<usize, String>) -> SubmitOutcome, so
the success/failure mapping is unit-tested without a Dioxus runtime; the
component now just applies the resulting outcome to its signals.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
schaefera added 1 commit 2026-09-15 08:11:04 +00:00
Bump rustls to 0.23.45 to clear RUSTSEC-2026-0285
All checks were successful
CI / check (pull_request) Successful in 10m18s
CI / test (pull_request) Successful in 6m44s
CI / audit (pull_request) Successful in 25s
49ce3eaad8
cargo audit was failing on main independent of this branch's changes: a
new advisory (published 2026-09-14) flags rustls 0.23.43, pulled in
transitively via dioxus-server/reqwest/rig-core, for accepting TLS 1.3
handshake messages across encryption level boundaries. The fix is
upstream in 0.23.45; no code changes needed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
schaefera merged commit b50b7e61cb into main 2026-09-15 09:11:51 +00:00
schaefera deleted branch worktree-extract-rsx-logic 2026-09-15 09:11:52 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: schaefera/feedsignal#9
No description provided.