Skip to content

feature: add a persistent 'export all notes' backup action #66

Description

@tech-adrian

Area
frontend/src/lib/notes.ts, frontend/src/app/{withdraw,history,compliance}/page.tsx

Problem
The only bulk-backup affordance in the app is downloadBackup() on the deposit page, and it's scoped to sessionNotes — notes created in the current deposit call only, not the full set of notes held in localStorage. A user who imported notes via NoteImport, received a note from someone else, or simply didn't click "Download" right after depositing has no way to export a single backup file covering everything they currently hold, even though Withdraw/History/Compliance all read and display the full note list. This is a distinct gap from QR export/import (#12, a new encoding format for individual notes) and CSV/JSON history export (#13, transaction/report records) — this is about bulk-exporting the actual spendable notes a user already has.

Proposed change
Add a persistent "Download all notes" action (reusing the existing serializeNote format) available from Withdraw, History, and/or Compliance — not just the ephemeral post-deposit panel — so a user can back up their full note set at any time.

Acceptance Criteria

  • A "Download all notes" action exists outside the post-deposit flow, covering every note in storage
  • Exported format matches the existing single-note serialization so it round-trips through NoteImport
  • Relevant tests (just test, pnpm test, cargo test, or nargo test as applicable) pass locally and in CI
  • A screenshot or short screen recording is attached to the PR showing the change working (exporting all notes and re-importing the file) — required before this can be merged.

Open your PR against the dev branch, not main. All active development merges into dev.

Discuss this issue / coordinate work: join the DShield contributor Telegram group: https://t.me/+SiGHH24No9U2MDJk

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions