Skip to content

feat: implement issues #916, #919, #920, #922 - #1073

Merged
Smartdevs17 merged 1 commit into
Smartdevs17:mainfrom
devJaja:feat/issues-916-919-920-922-advanced-search-atomic-batch-notifications-fallback
Aug 28, 2026
Merged

feat: implement issues #916, #919, #920, #922#1073
Smartdevs17 merged 1 commit into
Smartdevs17:mainfrom
devJaja:feat/issues-916-919-920-922-advanced-search-atomic-batch-notifications-fallback

Conversation

@devJaja

@devJaja devJaja commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements four high-priority Stellar Wave issues in a single atomic PR.


Issue #916 — Advanced search for subscriptions with Elasticsearch

Files changed: backend/elasticsearch/searchService.ts, backend/elasticsearch/__tests__/searchAggregator.test.ts

  • SubscriptionSearchAggregator — combines raw Elasticsearch hits with computed facets (category, billing cycle, status) and applies client-side filter sets (price range, tags, status, billing cycle, category).
  • SearchFacetManager — stateful filter-toggle manager used by the AdvancedSearchScreen to drive the facet sidebar without re-running full queries.
  • SearchAutoComplete — TTL-cached suggestion provider that batches identical prefix requests so the cluster isn't hit on every keystroke.
  • ✅ 20 passing tests

Issue #919 — Batch subscription operations with atomic execution

Files changed: app/services/atomicBatchService.ts, app/screens/BatchOperationsScreen.tsx, contracts/batch/tests/atomic_execution_tests.rs, app/services/__tests__/atomicBatchService.test.ts

  • AtomicBatchExecutor — executes ordered subscription operations with snapshot/rollback, idempotency key guard, per-item timeout and a failFast mode that aborts and rolls back on the first failure.
  • validateAtomicBatch / deriveIdempotencyKey — pre-flight validation and deterministic key derivation.
  • useAtomicBatch — React hook wiring the executor to the existing Zustand batch store.
  • AtomicExecutionPanel — new UI component in BatchOperationsScreen showing live status badge, per-item result counts, rollback reason and idempotency key.
  • Rust integration tests cover double-execution rejection, rollback-not-allowed for charge ops, and partial-success non-atomic mode.
  • ✅ 16 passing tests

Issue #920 — Subscription notification preferences and management

Files changed: backend/services/notification/preferenceService.ts, src/services/notificationService.ts, backend/services/notification/__tests__/notificationScheduling.test.ts

  • DigestNotificationManager — buffers notifications by immediate / daily / weekly frequency and groups flushed batches by channel.
  • NotificationScheduler — computes the next delivery timestamp respecting quiet hours and the user's frequency preference.
  • NotificationPreferenceSync — change-log with listener callbacks for cross-device preference synchronisation over WebSockets.
  • scheduleNotification() — convenience entry-point for the delivery pipeline combining all three services.
  • Frontend: getNotificationPreferenceSummary, setAllChannelNotifications, shouldShowNotification added to the React Native notification service.
  • ✅ 18 passing tests

Issue #922 — Payment method management with fallback chains

Files changed: src/services/walletService.ts, src/store/walletStore.ts, src/services/__tests__/fallbackChainHealth.test.ts

  • FallbackChainHealthMonitor — computes per-method health snapshots (success rate, avg latency, consecutive failures) within a configurable look-back window and applies rotation policies that automatically promote a healthy backup when the primary degrades.
  • SmartFallbackSelector — re-ranks the fallback order by health score and respects active rotation promotions.
  • buildFallbackChainDiagnosticReport — human-readable summary for the PaymentMethodsScreen debug panel.
  • walletStore extended with getChainHealthSnapshot, getSmartFallbackSelection, getChainDiagnosticReport, full rotation policy CRUD and applyAllRotationPolicies.
  • ✅ 15 passing tests

Testing

Test file Tests
src/services/__tests__/fallbackChainHealth.test.ts 15 ✅
backend/services/notification/__tests__/notificationScheduling.test.ts 18 ✅
backend/elasticsearch/__tests__/searchAggregator.test.ts 20 ✅
app/services/__tests__/atomicBatchService.test.ts 16 ✅

Total: 69 new tests, all passing.

Closes #916
Closes #919
Closes #920
Closes #922

, Smartdevs17#922 — search, atomic batch, notifications, fallback chains

Issue Smartdevs17#916 — Advanced search for subscriptions with Elasticsearch
- Add SubscriptionSearchAggregator with faceted search (category/status/billingCycle facets, price range filter)
- Add SearchFacetManager for stateful filter toggle management in UI
- Add SearchAutoComplete with TTL-based caching to reduce cluster load
- 20 passing tests: backend/elasticsearch/__tests__/searchAggregator.test.ts

Issue Smartdevs17#919 — Batch subscription operations with atomic execution
- Create app/services/atomicBatchService.ts: AtomicBatchExecutor with snapshot/rollback, idempotency keys, failFast mode
- Add useAtomicBatch React hook wiring executor to the batch store
- Add AtomicExecutionPanel component to BatchOperationsScreen with status badge and per-item report
- Add Rust integration tests in contracts/batch/tests/atomic_execution_tests.rs
- 16 passing tests: app/services/__tests__/atomicBatchService.test.ts

Issue Smartdevs17#920 — Subscription notification preferences and management
- Add DigestNotificationManager: buffers items by frequency and flushes due digests grouped by channel
- Add NotificationScheduler: computes next delivery window respecting quiet hours and frequency preferences
- Add NotificationPreferenceSync: change-log and listener pattern for cross-device sync
- Add scheduleNotification convenience function for the delivery pipeline
- Add getNotificationPreferenceSummary, setAllChannelNotifications, shouldShowNotification to frontend notificationService
- 18 passing tests: backend/services/notification/__tests__/notificationScheduling.test.ts

Issue Smartdevs17#922 — Payment method management with fallback chains
- Add FallbackChainHealthMonitor: per-method health snapshots with success rate, latency, consecutive failures, rotation policies
- Add SmartFallbackSelector: re-orders fallback chain by health score and honours active rotation promotions
- Add buildFallbackChainDiagnosticReport: human-readable chain health summary
- Extend walletStore with getChainHealthSnapshot, getSmartFallbackSelection, getChainDiagnosticReport, rotationPolicies CRUD, applyAllRotationPolicies
- 15 passing tests: src/services/__tests__/fallbackChainHealth.test.ts

Closes Smartdevs17#916, Smartdevs17#919, Smartdevs17#920, Smartdevs17#922
@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@devJaja Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants