Part of #998.
Blocked by synonymdev/bitkit-core#113. Also depends on the final activity model shape from synonymdev/bitkit-core#112.
Scope
Update the app's backup/restore flow after Core exposes wallet-scoped activity migration/export APIs.
Current app state:
ActivityBackupV1 stores Core-owned activities: List<Activity>, activityTags: List<ActivityTags>, and closedChannels: List<ClosedChannelDetails>.
MetadataBackupV1 stores Core-owned tagMetadata: List<PreActivityMetadata> alongside app-owned cache/pubky data.
BackupRepo currently decodes those payloads directly into generated Core models before Core can migrate legacy activity JSON.
- Core owns the activity data and activity DB. The app owns the VSS envelope, backup scheduling, and backup status.
Required app changes
After synonymdev/bitkit-core#113 lands:
- Read the
ACTIVITY and METADATA VSS backup envelopes without decoding Core-owned fields into generated Core models first.
- Pass raw Core-owned activity/tag/pre-activity metadata JSON to Core migration/import APIs.
- Keep app-owned restore work in the app, including cache, pubky session, settings, widgets, wallet records, and backup status handling.
- Ask Core for migrated/current Core-owned backup entries after migration/import.
- Rewrite the app-owned VSS backup envelopes with those migrated/current Core entries so the next restore no longer depends on legacy model JSON.
- Do not add app-owned v1/v2
walletId migration semantics for Core models.
Acceptance criteria
- A legacy activity backup whose Core activity/tag/metadata entries are missing
walletId restores through Core migration without app-side JSON patching.
- The app rewrites the
ACTIVITY and affected METADATA VSS backups with migrated/current Core entries after migration.
- Future restores decode the rewritten VSS backups without requiring the legacy migration path.
- Existing non-default wallet ids returned by Core are preserved in rewritten backups.
- Tests cover legacy
ActivityBackupV1 and MetadataBackupV1 restore input, the Core migration/import call boundary, and VSS backup rewrite behavior.
Part of #998.
Blocked by synonymdev/bitkit-core#113. Also depends on the final activity model shape from synonymdev/bitkit-core#112.
Scope
Update the app's backup/restore flow after Core exposes wallet-scoped activity migration/export APIs.
Current app state:
ActivityBackupV1stores Core-ownedactivities: List<Activity>,activityTags: List<ActivityTags>, andclosedChannels: List<ClosedChannelDetails>.MetadataBackupV1stores Core-ownedtagMetadata: List<PreActivityMetadata>alongside app-owned cache/pubky data.BackupRepocurrently decodes those payloads directly into generated Core models before Core can migrate legacy activity JSON.Required app changes
After synonymdev/bitkit-core#113 lands:
ACTIVITYandMETADATAVSS backup envelopes without decoding Core-owned fields into generated Core models first.walletIdmigration semantics for Core models.Acceptance criteria
walletIdrestores through Core migration without app-side JSON patching.ACTIVITYand affectedMETADATAVSS backups with migrated/current Core entries after migration.ActivityBackupV1andMetadataBackupV1restore input, the Core migration/import call boundary, and VSS backup rewrite behavior.