Skip to content

Extract subscription module into submodules#106

Merged
ryanoneill merged 1 commit intomainfrom
fix/subscription-extraction
Mar 2, 2026
Merged

Extract subscription module into submodules#106
ryanoneill merged 1 commit intomainfrom
fix/subscription-extraction

Conversation

@ryanoneill
Copy link
Owner

Summary

  • Splits the 1000-line src/app/subscription/mod.rs into 6 focused submodules
  • core.rs (258 lines): Subscription trait, BoxedSubscription, Tick/Timer/Channel/Stream subscriptions
  • combinators.rs (366 lines): Mapped, Filter, Take, Debounce, Throttle subscriptions
  • ext.rs (128 lines): SubscriptionExt trait with combinator methods
  • batch.rs (44 lines): BatchSubscription and batch() function
  • interval.rs (107 lines): IntervalImmediateSubscription and interval_immediate()
  • terminal.rs (112 lines): TerminalEventSubscription and terminal_events()
  • New mod.rs is 42 lines (re-exports only), down from 1000
  • All public API paths preserved — zero breaking changes

Test plan

  • cargo test --all-features passes (2882 unit + 267 doc)
  • cargo clippy --all-features -- -D warnings clean
  • All 59 subscription tests pass unchanged

🤖 Generated with Claude Code

Extract the 1000-line monolithic subscription module into 6 focused
submodules while preserving all public API paths and test compatibility:

- core.rs: Subscription trait, BoxedSubscription, Tick/Timer/Channel/Stream
- combinators.rs: Mapped/Filter/Take/Debounce/Throttle subscriptions
- ext.rs: SubscriptionExt trait and blanket impl
- batch.rs: BatchSubscription and batch() function
- interval.rs: IntervalImmediateSubscription and interval_immediate()
- terminal.rs: TerminalEventSubscription and terminal_events()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ryanoneill ryanoneill merged commit 41832db into main Mar 2, 2026
10 of 12 checks passed
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 85.95506% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.82%. Comparing base (ff80ab6) to head (f26e224).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
src/app/subscription/terminal.rs 12.50% 14 Missing ⚠️
src/app/subscription/combinators.rs 92.00% 6 Missing ⚠️
src/app/subscription/core.rs 95.83% 2 Missing ⚠️
src/app/subscription/interval.rs 89.47% 2 Missing ⚠️
src/app/subscription/batch.rs 90.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #106   +/-   ##
=======================================
  Coverage   92.82%   92.82%           
=======================================
  Files          94       99    +5     
  Lines        9471     9471           
=======================================
  Hits         8791     8791           
  Misses        680      680           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants