Skip to content

feat(backup): introduce backup support - #64

Merged
OffRange merged 61 commits into
v2from
feat/backup-ui
Aug 1, 2026
Merged

feat(backup): introduce backup support#64
OffRange merged 61 commits into
v2from
feat/backup-ui

Conversation

@OffRange

Copy link
Copy Markdown
Owner

Ths PR re-adds backup support (closes #51).

Features

Downsides

  • kdbx backups are no longer supported. Encrypted backups are JSON only

OffRange and others added 30 commits June 12, 2026 12:17
Update BackupHubViewModel to process incoming UI events, wiring the schedule
backup click to navigate to the export screen and adding a placeholder for
the restore backup event.
Snapshot of the backup destination resolver + export wizard changes
before layering the one-time file-picker work on top.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Relocate the `ScheduleMode` enum from `ExportWizardUiState.kt` to its own dedicated file. This change also updates the visibility of the enum and fixes the corresponding imports across the backup presentation layer.
Update `KeyId` to include a `needsAuthentication` flag and add a new
`BackupPassphraseKey` constant. Modify `KeyStoreManagerImpl` to respect
this flag during key creation and require an unlocked device on
supported Android versions.
Add the BackupDestinationUri field to SelectDestinationState and update
ExportWizardViewModel to populate it when a destination is resolved.
Recurring backups now require an encrypted format (KDBX). Selecting a
non-encrypted format coerces the schedule to one-time and disables the
recurring option with an explanation; the ViewModel also guards against
direct recurring selection when it is not allowed.

Adds SelectScheduleState.recurringAllowed, the disabled/explanatory UI in
SelectScheduleContent, the schedule_recurring_requires_encryption string,
and gating tests. Also fixes the broken test baseline (missing
testFixtures(core:item) dependency and passwordStrengthEstimator arg).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Brings the worker/data layer (scheduler, DataStore, FinishExportWizardUseCase,
KeyStore-wrapped passphrase) into the UI branch.

Conflict resolution:
- feature/backup/build.gradle.kts: kept both core:security impl and the
  testFixtures(core:item) test dependency.
- ExportWizardViewModel auto-merged: gating logic (recurring requires encrypted)
  coexists with the new finishExport()/use-case wiring.

Merge compat:
- ExportWizardViewModelTest now constructs the new FinishExportWizardUseCase
  param via minimal placeholder fakes (the wizard tests never reach the finish
  step). Replace with shared testFixtures fakes once the worker layer provides them.

Verified: :feature:backup:testDebugUnitTest BUILD SUCCESSFUL, 9 tests, 0 failures.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(backup): implement basic structs

* feat(backup): implement json backup

* refactor(backup): split json module into encryption/key/model/format

Break the monolithic json.rs into focused modules: encryption (seal/open
envelope), key (BackupKey derivation), model (backup data types), and
format/json (JSON framing). No behavior change; full backup suite green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(crypto): add HKDF-SHA256 primitive

A fast KDF for high-entropy keying material, mirroring the argon2
primitive. Used by the ARK backup path where a memory-hard password
stretch buys nothing over a uniformly-random 256-bit key.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(backup): derive ARK backup key with HKDF-SHA256

Make the Kdf header per-source: Argon2id for the low-entropy passphrase
path, HkdfSha256 for the full-entropy ARK path (a memory-hard stretch
over a random 256-bit key buys nothing). open() now pairs (source, kdf,
cred) and rejects a source<->kdf mismatch with MalformedHeader before
deriving any key.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* test(backup): freeze v1 ARK golden backup

Mirror golden_v1_passphrase_still_decrypts for the ARK path so the HKDF
derivation and ARK wire format fail loudly if they ever drift.

Also add wrong_ark_fails to assert that importing an ARK backup with a
different ARK fails opaquely with Crypto(DecryptionFailed), matching the
wrong_passphrase_fails behavior and proving no panic on bad credential.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* refactor(backup): cleanup

* fix(backup): use argon params

* refactor(backup): modify aad

* refactor(backup): vaults hold logins/cards lists; re-freeze v1 goldens

Vault now holds `logins: Vec<Login>` and `cards: Vec<Card>` (was a single
`login`/`card`), and backup items derive Default — prerequisites for CSV
import, which yields many logins per vault. The v1 passphrase and ARK
golden backups are re-frozen at the new payload schema; version is
unchanged since the backup format is not yet shipped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(backup): csv format

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* feat(backup): csv export

* feat(backup): add bindings

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
fix(backup): don't show a failure reason on a cancelled schedule

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

feat(backup): show why a backup failed on the hub row

feat(backup): surface the failure reason on dispatched backups

feat(backup): record why an export failed

feat(backup): record and clear the failure reason on markFinished

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

feat(backup): persist the failure reason on the job record

feat(backup): add BackupFailureReason taxonomy

feat(backup): group the hub into In progress, Scheduled and Recent

Replace the flat dispatched-backup list with three sections derived from
state + kind, rendered as Material 3 Expressive segmented list items.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Squash-merge feat/backup-import. Adds the CSV analyze/map/import flow to
the import wizard: column analysis domain models and AnalyzeCsvUseCase,
a map-columns review step with a type picker, an import destination step
that can target a specific vault, atomic restore to prevent partial
imports, and the passphrase/progress/result/error screens. Includes
accessibility fixes and tests for ImportWizardUiState.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 31, 2026 17:48

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Reintroduces full backup/restore support into KeyGo v2 by adding a dedicated :feature:backup module, Rust-side backup format/encryption primitives (JSON + CSV), and WorkManager-backed scheduling so encrypted backups can run periodically (including to non-local document providers via SAF).

Changes:

  • Added new :feature:backup module with export/import wizards, backup hub UI, job persistence (DataStore/proto), and WorkManager scheduling/cancellation.
  • Implemented Rust backup library surface (models, JSON/CSV formats, encryption helpers, HKDF + base64 utilities) and Kotlin-side UniFFI helpers/fakes for testing.
  • Extended security + data layers to support scheduled backups (new keystore aliases, key deletion API, transaction runner abstraction, and repository query additions used by backup restore/export).

Reviewed changes

Copilot reviewed 269 out of 271 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
settings.gradle.kts Includes new backup feature module
rust/src/testFixtures/kotlin/de/davis/keygo/rust/FakeKeyWrapper.kt Comment punctuation tweak
rust/src/testFixtures/kotlin/de/davis/keygo/rust/FakeJsonBackupManager.kt New UniFFI JSON backup fake
rust/src/testFixtures/kotlin/de/davis/keygo/rust/FakeItemManager.kt Comment punctuation tweak
rust/src/testFixtures/kotlin/de/davis/keygo/rust/FakeCsvBackupManager.kt New UniFFI CSV backup fake
rust/src/main/kotlin/de/davis/keygo/rust/di/RustModule.kt DI provides backup managers
rust/src/main/kotlin/de/davis/keygo/rust/backup/JsonBackupManager.kt Result wrappers for JSON manager
rust/src/main/kotlin/de/davis/keygo/rust/backup/CsvBackupManager.kt Result wrappers for CSV manager
rust/src/main/kotlin/de/davis/keygo/rust/backup/BackupResult.kt Shared UniFFI→Result folding
rust/rust-code/lib/src/url.rs Comment punctuation tweak
rust/rust-code/lib/src/totp.rs Adds TOTP secret validator
rust/rust-code/lib/src/lib.rs Exposes backup module + b64
rust/rust-code/lib/src/crypto/primitive/mod.rs Adds HKDF primitive module
rust/rust-code/lib/src/crypto/primitive/hkdf.rs New HKDF-SHA256 helper + tests
rust/rust-code/lib/src/crypto/error.rs Error message punctuation tweak
rust/rust-code/lib/src/card/number.rs Doc punctuation tweak
rust/rust-code/lib/src/card/network.rs Comment range punctuation tweak
rust/rust-code/lib/src/card/mod.rs Doc punctuation tweak
rust/rust-code/lib/src/backup/model.rs Backup wire model structs
rust/rust-code/lib/src/backup/mod.rs Backup module exports/constants
rust/rust-code/lib/src/backup/format/mod.rs Backup format module wiring
rust/rust-code/lib/src/backup/error.rs Backup error enum
rust/rust-code/lib/src/b64.rs Base64 serde adapter + tests
rust/rust-code/lib/Cargo.toml Adds backup-related deps
rust/rust-code/bindings/src/lib.rs Registers backup bindings module
rust/rust-code/bindings/src/key_wrap.rs Error message punctuation tweak
rust/rust-code/bindings/src/item.rs Error message punctuation tweak
rust/rust-code/bindings/Cargo.toml Adds serde_json dev-dep
rust/rust-code/.cargo/config.toml Comment punctuation tweak
README.md Minor punctuation/typography tweaks
gradle/libs.versions.toml Adds WorkManager + bumps Material3 alpha
feature/vault/src/main/kotlin/de/davis/keygo/feature/vault/presentation/components/VaultSelectionSheet.kt Adds extra opt-in annotation
feature/vault/src/main/kotlin/de/davis/keygo/feature/vault/presentation/components/VaultCreationDialog.kt Reuses shared VaultIconPicker
feature/vault/src/main/kotlin/de/davis/keygo/feature/vault/domain/usecase/MoveItemsToVaultUseCase.kt Comment punctuation tweak
feature/totp/src/main/kotlin/de/davis/keygo/feature/totp/presentation/component/QRScanner.kt Comment punctuation tweak
feature/settings/src/test/kotlin/de/davis/keygo/feature/settings/presentation/SettingsViewModelTest.kt Adds backup navigation/state tests
feature/settings/src/main/res/values/strings.xml Updates settings backup strings
feature/settings/src/main/kotlin/de/davis/keygo/feature/settings/presentation/SettingsViewModel.kt Adds ObserveLastBackup integration
feature/settings/src/main/kotlin/de/davis/keygo/feature/settings/presentation/SettingsUiState.kt Adds lastBackupAt to UI state
feature/settings/src/main/kotlin/de/davis/keygo/feature/settings/presentation/SettingsUiEvent.kt Replaces export/import with OpenBackup
feature/settings/src/main/kotlin/de/davis/keygo/feature/settings/presentation/SettingsScreen.kt Wires backup navigation callback
feature/settings/src/main/kotlin/de/davis/keygo/feature/settings/presentation/SettingsRoutes.kt Routes open backup instead of TODO
feature/settings/src/main/kotlin/de/davis/keygo/feature/settings/presentation/SettingsEvent.kt Adds NavigateToBackup event
feature/settings/src/main/kotlin/de/davis/keygo/feature/settings/presentation/component/SettingsList.kt Supporting text uses UIText
feature/settings/src/main/kotlin/de/davis/keygo/feature/settings/presentation/component/SettingsEntry.kt Supporting becomes UIText (dynamic)
feature/settings/src/main/kotlin/de/davis/keygo/feature/settings/presentation/component/SettingsDsl.kt DSL updated for UIText supporting
feature/settings/build.gradle.kts Depends on feature.backup
feature/list_screen/src/test/kotlin/de/davis/keygo/feature/list_screen/domain/usecase/FilterUseCaseTest.kt Comment style tweaks
feature/item/view/src/test/kotlin/de/davis/keygo/feature/item/view/login/model/ObfuscatedStringTest.kt ASCII-safe bullet expectations
feature/item/view/src/test/kotlin/de/davis/keygo/feature/item/view/creditcard/ViewCreditCardViewModelTest.kt Bullet char made explicit
feature/item/view/src/main/kotlin/de/davis/keygo/feature/item/view/login/ViewLoginContent.kt Bullet rendered via U+2022
feature/item/view/src/main/kotlin/de/davis/keygo/feature/item/view/login/model/ObfuscatedString.kt Obfuscation char via U+2022
feature/item/view/src/main/kotlin/de/davis/keygo/feature/item/view/creditcard/ViewCreditCardContent.kt Bullet rendered via U+2022
feature/item/create/src/main/kotlin/de/davis/keygo/feature/item/create/presentation/ItemViewModel.kt Comment punctuation tweak
feature/item/create/src/main/kotlin/de/davis/keygo/feature/item/create/presentation/creditcard/CreditCardViewModel.kt Comment punctuation tweak
feature/item/core/src/test/kotlin/de/davis/keygo/feature/item/core/domain/usecase/CreateNewOrUpdateLoginUseCaseTest.kt Comment typography tweaks
feature/item/core/src/main/kotlin/de/davis/keygo/feature/item/core/presentation/transformation/CvvInputTransformation.kt Comment punctuation tweak
feature/credit-card/src/main/res/values/strings.xml Tweaks scan error punctuation
feature/credit-card/src/main/kotlin/de/davis/keygo/feature/credit_card/presentation/NfcInfoCard.kt Comment punctuation tweak
feature/credentials/src/main/kotlin/de/davis/keygo/feature/credentials/presentation/provide/activity/ProvidePasskeyActivity.kt Comment punctuation tweak
feature/credentials/src/main/kotlin/de/davis/keygo/feature/credentials/presentation/create/activity/CreatePasskeyActivity.kt Comment punctuation tweak
feature/backup/src/test/kotlin/de/davis/keygo/feature/backup/worker/BackupWorkerResultTest.kt Worker result mapping tests
feature/backup/src/test/kotlin/de/davis/keygo/feature/backup/RestorerTestEnv.kt Restore integration test env
feature/backup/src/test/kotlin/de/davis/keygo/feature/backup/presentation/import/model/ImportWizardStepTest.kt Import step lane tests
feature/backup/src/test/kotlin/de/davis/keygo/feature/backup/presentation/export/model/ExportWizardStepTest.kt Export step lane tests
feature/backup/src/test/kotlin/de/davis/keygo/feature/backup/FakePersistableUriManager.kt Fake SAF permission manager
feature/backup/src/test/kotlin/de/davis/keygo/feature/backup/FakeDispatchedBackupRepository.kt Fake WorkManager status repo
feature/backup/src/test/kotlin/de/davis/keygo/feature/backup/FakeBackupJobRepositoryTest.kt Job state mutation tests
feature/backup/src/test/kotlin/de/davis/keygo/feature/backup/FakeBackupJobRepository.kt In-memory job repository fake
feature/backup/src/test/kotlin/de/davis/keygo/feature/backup/FakeBackupFileStoreTest.kt File store fake tests
feature/backup/src/test/kotlin/de/davis/keygo/feature/backup/FakeBackupFileStore.kt In-memory backup file store
feature/backup/src/test/kotlin/de/davis/keygo/feature/backup/FakeBackupArkKeyStoreTest.kt ARK keystore fake tests
feature/backup/src/test/kotlin/de/davis/keygo/feature/backup/FakeBackupArkKeyStore.kt In-memory escrow store fake
feature/backup/src/test/kotlin/de/davis/keygo/feature/backup/domain/usecase/ObserveLastBackupUseCaseTest.kt Last-backup selection tests
feature/backup/src/test/kotlin/de/davis/keygo/feature/backup/domain/model/ExportErrorTest.kt ExportError→reason mapping tests
feature/backup/src/test/kotlin/de/davis/keygo/feature/backup/domain/mapper/CsvMappingMappersTest.kt CSV mapping mapper tests
feature/backup/src/test/kotlin/de/davis/keygo/feature/backup/data/repository/BackupJobRetentionTest.kt Retention logic tests
feature/backup/src/test/kotlin/de/davis/keygo/feature/backup/data/FakeBackupDestinationResolver.kt Fake destination resolver
feature/backup/src/main/proto/backup_jobs.proto Job persistence schema
feature/backup/src/main/proto/backup_ark_data.proto ARK escrow persistence schema
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/RouteDestination.kt Backup navigation routes
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/import/ProvidePassphraseContent.kt Import passphrase UI
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/import/model/ImportWizardUiEvent.kt Import wizard UI events
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/import/model/ImportWizardStep.kt Import wizard steps/lanes
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/import/model/ImportWizardEvent.kt Import wizard one-shot events
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/import/model/ColumnMappingRow.kt Map-columns UI model
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/import/ImportWizardScreen.kt Import screen + document picker
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/hub/model/BackupSection.kt Hub grouping sections
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/hub/model/BackupHubUiState.kt Hub UI state
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/hub/model/BackupHubUiEvent.kt Hub UI events
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/hub/model/BackupHubEvent.kt Hub navigation events
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/hub/model/BackupGroup.kt Hub section group model
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/hub/BackupHubViewModel.kt Hub orchestration + cancel
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/hub/BackupHubScreen.kt Hub screen wiring
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/hub/BackupGrouping.kt Work status→UI grouping
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/export/SelectFileFormatContent.kt Export format selection UI
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/export/SelectCsvPresetContent.kt CSV preset selection UI
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/export/model/SelectScheduleState.kt Export schedule state model
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/export/model/SelectFormatState.kt Export format state model
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/export/model/SelectDestinationState.kt Export destination state
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/export/model/ScheduleMode.kt One-time vs recurring enum
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/export/model/ProvidePassphraseState.kt Export passphrase state
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/export/model/ExportWizardUiState.kt Export wizard state machine
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/export/model/ExportWizardUiEvent.kt Export wizard UI events
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/export/model/ExportWizardStep.kt Export wizard step list
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/export/model/ExportWizardEvent.kt Export wizard one-shot events
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/export/model/BackupFile.kt Preview filename helper
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/export/ExportWizardScreen.kt Export screen + folder picker
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/component/IconBadge.kt Badge UI component
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/component/BackupWarningCard.kt Permanent warning UI
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/component/BackupListDefaults.kt Shared list colors
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/presentation/BackupGraph.kt Navigation graph wiring
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/usecase/RecordBackupOutcomeUseCase.kt Persist run outcome + cleanup
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/usecase/ObserveLastBackupUseCase.kt Last successful backup flow
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/usecase/ObserveDispatchedBackupsUseCase.kt Enrich WorkManager statuses
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/usecase/CancelBackupUseCase.kt Cancel + cleanup orchestration
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/usecase/AnalyzeCsvUseCase.kt CSV analysis pipeline
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/SessionExt.kt Session ARK probe helper
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/repository/BackupJobRepository.kt Job repository interface
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/repository/BackupArkKeyStore.kt Escrow keystore store interface
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/PersistableUriManager.kt SAF permission interface
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/MappingConfidence.kt CSV confidence domain enum
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/LastBackup.kt Last-backup domain model
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/ImportTarget.kt Import target vault model
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/ImportSummary.kt Import summary model
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/ImportRequest.kt Import request model
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/ImportProgress.kt Import progress ADT
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/ImportError.kt Import error ADT
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/FinishExportWizardError.kt Wizard finish error ADT
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/FileFormat.kt CSV/JSON format metadata
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/ExportProgress.kt Export progress ADT
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/ExportError.kt Export error taxonomy
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/ExportDetails.kt Export details model
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/EncryptionMethod.kt Passphrase vs ARK sealing
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/DispatchedBackup.kt Work status domain model
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/CsvPreset.kt CSV export preset enum
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/CsvColumnType.kt Column type assignment enum
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/CsvColumnAnalysis.kt CSV analysis domain structs
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/CollectedBackup.kt Collected export payload
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/BackupWorkStatus.kt WorkManager status record
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/BackupResult.kt Persisted run result ADT
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/BackupJob.kt Persisted job model
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/BackupInterval.kt Backup interval model
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/BackupFileName.kt Timestamped filename helper
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/BackupFailureReason.kt Persisted failure reason enum
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/BackupEntry.kt Listed backup file entry
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/BackupDestinationUri.kt URI inline wrapper
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/model/BackupDestination.kt Destination display model
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/mapper/ImportMappers.kt Rust backup→domain mapping
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/mapper/ImportErrorMappers.kt Rust exception→ImportError
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/mapper/ExportMappers.kt Domain→Rust backup mapping
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/mapper/CsvMappingMappers.kt CSV analysis/assignment mapping
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/DispatchedBackupRepository.kt WorkManager status repository API
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/BackupScheduler.kt Scheduling abstraction
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/BackupProvisioningLock.kt Provision/cleanup mutex
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/BackupFileStore.kt SAF-backed file store API
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/BackupEscrowReconciler.kt Startup escrow reconciliation
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/domain/BackupDestinationResolver.kt Destination resolver API
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/di/FeatureBackupModule.kt Backup Koin module + DataStores
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/di/annotation/BackupJobsQualifier.kt Qualifier for jobs DataStore
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/di/annotation/BackupArkQualifier.kt Qualifier for escrow DataStore
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/data/repository/BackupJobRetention.kt Caps retained job records
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/data/PersistableUriManagerImpl.kt SAF permission implementation
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/data/mapper/DispatchedBackupMapper.kt WorkInfo→domain mapping
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/data/DispatchedBackupRepositoryImpl.kt WorkManager integration
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/data/BackupSession.kt Session wrapper for backups
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/data/BackupArkKeyStoreImpl.kt Escrow DataStore implementation
feature/backup/src/main/kotlin/de/davis/keygo/feature/backup/BackupInterval.kt UI display strings for interval
feature/backup/src/main/AndroidManifest.xml Removes default WM initializer
feature/backup/consumer-rules.pro Consumer proguard rules stub
feature/backup/build.gradle.kts New backup module build config
feature/autofill/src/testFixtures/kotlin/de/davis/keygo/core/feature/autofill/FakeSignatureInfoProvider.kt Comment style tweak
feature/autofill/src/test/kotlin/de/davis/keygo/feature/autofill/presentation/ClassifierTest.kt Comment punctuation tweaks
feature/autofill/src/main/res/values/strings.xml Quote escaping change in plurals
core/util/src/main/kotlin/de/davis/keygo/core/util/presentation/snackbar/ObserveSnackbarEvents.kt Comment punctuation tweaks
core/util/src/main/kotlin/de/davis/keygo/core/util/domain/usecase/SortUseCase.kt Comment punctuation tweak
core/security/src/testFixtures/kotlin/de/davis/keygo/core/security/crypto/FakeKeyStoreManager.kt New keystore fake + delete
core/security/src/testFixtures/kotlin/de/davis/keygo/core/security/crypto/FakeCryptographicScopeProviderFactory.kt New factory fake
core/security/src/testFixtures/kotlin/de/davis/keygo/core/security/crypto/BindingCryptographicScopeProvider.kt Comment punctuation tweak
core/security/src/test/kotlin/de/davis/keygo/core/security/domain/usecase/ItemWithCryptoScopeUseCaseTest.kt Adds withItem coverage
core/security/src/test/kotlin/de/davis/keygo/core/security/crypto/FakeKeyStoreManagerTest.kt Adds keystore fake tests
core/security/src/main/kotlin/de/davis/keygo/core/security/domain/usecase/ItemWithCryptoScopeUseCase.kt Exposes withItem helper
core/security/src/main/kotlin/de/davis/keygo/core/security/domain/model/KeyId.kt Key aliases become enum
core/security/src/main/kotlin/de/davis/keygo/core/security/domain/KeyStoreManager.kt Adds deleteKey API
core/security/src/main/kotlin/de/davis/keygo/core/security/domain/crypto/CryptographicScopeProviderFactory.kt Adds factory abstraction
core/security/src/main/kotlin/de/davis/keygo/core/security/domain/crypto/CipherExt.kt suspendDoFinal helper
core/security/src/main/kotlin/de/davis/keygo/core/security/data/KeyStoreManagerImpl.kt Key creation policy per KeyId
core/security/src/main/kotlin/de/davis/keygo/core/security/data/crypto/CryptographicScopeProviderFactoryImpl.kt Factory implementation
core/item/src/testFixtures/kotlin/de/davis/keygo/core/item/FakeTransactionRunner.kt New transaction runner fake
core/item/src/testFixtures/kotlin/de/davis/keygo/core/item/FakePasskeyRepository.kt Adds getPasskeysByLogin
core/item/src/testFixtures/kotlin/de/davis/keygo/core/item/FakeCreditCardRepository.kt Adds getCreditCardsByVault
core/item/src/test/kotlin/de/davis/keygo/core/item/FakePasskeyRepositoryTest.kt Tests new fake method
core/item/src/test/kotlin/de/davis/keygo/core/item/FakeCreditCardRepositoryTest.kt Tests new vault query
core/item/src/test/kotlin/de/davis/keygo/core/item/data/mapper/ItemMapperTest.kt Comment typography tweaks
core/item/src/main/kotlin/de/davis/keygo/core/item/presentation/VaultIconPicker.kt Shared vault icon picker UI
core/item/src/main/kotlin/de/davis/keygo/core/item/domain/TransactionRunner.kt Adds transaction abstraction
core/item/src/main/kotlin/de/davis/keygo/core/item/domain/repository/PasskeyRepository.kt Adds getPasskeysByLogin API
core/item/src/main/kotlin/de/davis/keygo/core/item/domain/repository/CreditCardRepository.kt Adds getCreditCardsByVault API
core/item/src/main/kotlin/de/davis/keygo/core/item/data/repository/RoomTransactionRunner.kt Room transaction implementation
core/item/src/main/kotlin/de/davis/keygo/core/item/data/repository/PasskeyRepositoryImpl.kt Implements getPasskeysByLogin
core/item/src/main/kotlin/de/davis/keygo/core/item/data/repository/CreditCardRepositoryImpl.kt Implements getCreditCardsByVault
core/item/src/main/kotlin/de/davis/keygo/core/item/data/local/entity/credential/PasswordEntity.kt Comment punctuation tweak
core/item/src/main/kotlin/de/davis/keygo/core/item/data/local/dao/PasskeyDao.kt Adds query by login_id
core/item/src/main/kotlin/de/davis/keygo/core/item/data/local/dao/CreditCardDao.kt Adds query by vault_id
core/identity/src/main/kotlin/de/davis/keygo/core/identity/domain/usecase/CreateAccessUseCase.kt Comment punctuation tweak
CLAUDE.md Documents backup escrow constraints
app/src/main/kotlin/de/davis/keygo/app/presentation/MainActivity.kt Adds backup graph + navigation
app/src/main/kotlin/de/davis/keygo/app/KeyGoApplication.kt Enables Koin WorkManager factory
app/build.gradle.kts Adds backup + koin-workmanager deps

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread rust/src/main/kotlin/de/davis/keygo/rust/backup/BackupResult.kt
@OffRange OffRange changed the title ffet(backup): introduce backup support feat(backup): introduce backup support Jul 31, 2026
@OffRange

Copy link
Copy Markdown
Owner Author

Follow up would be updating existing items during import. Instead of skipping a item when the key already exists, we ma want to update empty fields in this existing item

Comment thread rust/rust-code/lib/src/backup/encryption.rs Fixed
Comment thread rust/rust-code/lib/src/backup/encryption.rs Dismissed
Comment thread rust/rust-code/lib/src/backup/encryption.rs Fixed
Comment thread rust/rust-code/lib/src/backup/encryption.rs Dismissed
Comment thread rust/rust-code/lib/src/backup/format/json.rs Fixed
Comment thread rust/rust-code/lib/src/backup/format/json.rs Dismissed
Comment thread rust/rust-code/lib/src/backup/format/json.rs Fixed
Comment thread rust/rust-code/lib/src/backup/key.rs Fixed
Comment thread rust/rust-code/lib/src/backup/key.rs Fixed
Comment thread rust/rust-code/lib/src/backup/key.rs Fixed
OffRange and others added 7 commits August 1, 2026 12:01
…astBackupUseCase change

The test constructed ObserveLastBackupUseCase with a trailing lambda as if it were
a functional interface, but it's a plain class taking a BackupJobRepository. Use
the existing FakeBackupJobRepository testFixture instead, mirroring the pattern
already used by feature/backup's own ObserveLastBackupUseCaseTest. Also adds the
missing testImplementation(testFixtures(projects.feature.backup)) dependency.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@OffRange
OffRange merged commit c955024 into v2 Aug 1, 2026
9 checks passed
@OffRange
OffRange deleted the feat/backup-ui branch August 1, 2026 13:13
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.

Reimplement backup import Microsoft Authenticator exported passwords using csv file. Auto backup

3 participants