feat(export): CSV export scope — All / current filter / date range

Finishes the transactions-export partial. The dialog now offers three scopes:
- All transactions (unchanged default; exported with no copy).
- Current History filter — the Transactions tab publishes a TxFilterSnapshot of
  the visible legs (a merged autoshield row contributes both its send+receive
  legs, so the CSV stays a per-leg record like an unfiltered export); the radio
  is disabled with an explanation when no filter is active, and a snapshot that
  predates the current tx list (revision mismatch) is refused rather than
  silently exporting everything.
- Date range (YYYY-MM-DD, inclusive end-of-day; pending/dateless rows excluded
  with a note; invalid/reversed dates blocked inline).
The live count reflects what will actually be exported. formatTransactionsCsv
and the atomic write are unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 00:19:24 -05:00
co-authored by Claude Opus 4.8
parent 8961cbdfc9
commit 8b46ead72a
4 changed files with 161 additions and 5 deletions
+10
View File
@@ -2131,6 +2131,16 @@ void I18n::loadBuiltinEnglish()
strings_["export_tx_none"] = "No transactions to export";
strings_["export_tx_success"] = "Transactions exported successfully";
strings_["export_tx_open_folder"] = "Open folder";
strings_["export_tx_scope"] = "Export scope";
strings_["export_tx_scope_all"] = "All transactions";
strings_["export_tx_scope_filter"] = "Current History filter";
strings_["export_tx_scope_range"] = "Date range";
strings_["export_tx_scope_filter_none"] = "No filter is active on the History tab";
strings_["export_tx_scope_stale"] = "The History filter changed while loading. Close and reopen this dialog.";
strings_["export_tx_range_from"] = "From (YYYY-MM-DD)";
strings_["export_tx_range_to"] = "To (YYYY-MM-DD)";
strings_["export_tx_range_invalid"] = "Enter valid dates as YYYY-MM-DD, with From on or before To";
strings_["export_tx_range_pending_note"] = "Pending transactions have no date and are not included in a date range.";
strings_["export_tx_title"] = "Export Transactions to CSV";
// --- Import Key Dialog ---