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

4 commits

Author SHA1 Message Date
Austin Schaefer
49ce3eaad8 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
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>
2026-09-15 10:11:00 +02:00
Austin Schaefer
bd086b0288 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
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>
2026-09-15 09:50:06 +02:00
Austin Schaefer
2ae3293c9d 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
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-15 09:42:08 +02:00
Austin Schaefer
de6256a812 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
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>
2026-09-15 09:26:00 +02:00