Skip to content

feat: add event-driven auto backup triggers after wallet changes - #1377

Draft
sneurlax wants to merge 3 commits into
stagingfrom
feat/306-auto-backup-triggers
Draft

sneurlax wants to merge 3 commits into
stagingfrom
feat/306-auto-backup-triggers

Conversation

@sneurlax

Copy link
Copy Markdown
Member

Fire a debounced auto-backup when a transaction note is saved or an address book contact is created, edited, or deleted.

closes #306

@codecov

codecov Bot commented May 28, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 27.71084% with 120 lines in your changes missing coverage. Please review.
✅ Project coverage is 9.69%. Comparing base (1e2e4d9) to head (f3bfdef).
⚠️ Report is 26 commits behind head on staging.

Files with missing lines Patch % Lines
...view/stack_backup_views/edit_auto_backup_view.dart 0.00% 39 Missing ⚠️
...gs_menu/backup_and_restore/create_auto_backup.dart 0.00% 31 Missing ⚠️
lib/services/auto_swb_service.dart 65.45% 19 Missing ⚠️
lib/utilities/prefs.dart 0.00% 13 Missing ⚠️
lib/services/address_book_service.dart 0.00% 7 Missing ⚠️
.../wallet_view/transaction_views/edit_note_view.dart 25.00% 3 Missing ⚠️
...roviders/global/address_book_service_provider.dart 25.00% 3 Missing ⚠️
.../sub_views/backup_frequency_type_select_sheet.dart 33.33% 2 Missing ⚠️
lib/utilities/format.dart 50.00% 2 Missing ⚠️
...ib/providers/global/auto_swb_service_provider.dart 83.33% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #1377      +/-   ##
===========================================
+ Coverage     7.85%    9.69%   +1.83%     
===========================================
  Files         1125     1129       +4     
  Lines       112820   113585     +765     
===========================================
+ Hits          8866    11007    +2141     
+ Misses      103954   102578    -1376     

☔ View full report in Codecov by Harness.
📢 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.

@sneurlax

Copy link
Copy Markdown
Member Author

Converting to draft because I have too many open PRs ready--will take another review pass over this before re-readying it

@sneurlax
sneurlax marked this pull request as draft August 20, 2026 18:58
@sneurlax
sneurlax force-pushed the feat/306-auto-backup-triggers branch from 16b6692 to 07d6fec Compare August 25, 2026 00:03
CI's format check runs over every .dart file a PR touches, so reformat
them up front instead of mixing the reflow into the feature diff.
Fire a debounced auto-backup when a transaction note is saved or an
address book contact is created, edited, or deleted, under a new
"After editing a note or contact" backup frequency.

AutoSWBService becomes provider-owned and takes its enabled/frequency
gate as a predicate that is re-evaluated when the debounce fires, so
turning auto backup off inside the debounce window cancels the pending
backup and an SWB restore cannot trigger a backup storm. Changes arriving
during an active backup queue a single follow-up instead of being dropped,
and timers and notifications are inert after disposal.

Rewriting the "default" self contact with identical data, which both
address book views do on every open, no longer counts as an edit.

closes #306
@sneurlax
sneurlax force-pushed the feat/306-auto-backup-triggers branch from 07d6fec to f3bfdef Compare October 13, 2026 16:24
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.

Auto Backup Wallet After Changes

1 participant