Feature: Key backup import on first-run setup #40
Labels
No labels
area:api
area:core
area:docs
area:infra
area:ux
dependencies
documentation
duplicate
good first issue
help wanted
invalid
question
rust
status:complete
status:partial
status:planned
type:bug
type:design
type:feature
type:infra
type:refactor
type:research
type:ux
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
icub3d/decentcom#40
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Migrated from GitHub issue icub3d/decentcom#51
Original Author: @icub3d
Original Date: 2026-04-16T18:01:30Z
Feature: Key backup import on first-run setup
Overview
The first-run Setup screen currently offers two options: "Create New Identity" (generates a new key + seed phrase) and "Import Existing" (restores from a 24-word BIP39 mnemonic). Users who have a
.dckbencrypted key backup file (created by the key recovery feature, #26) have no way to use it during initial setup — they are forced to enter a seed phrase they may not have. This feature adds a third path on the Setup screen: restore from an encrypted backup file.Background
The key recovery feature (#26) shipped
KeyImportas a settings panel for users who are already set up. However, the most common recovery scenario is a fresh device with no keys — exactly when the Settings panel is inaccessible. TheSetuppage inclient/src/pages/Setup.tsxcontrols the first-run flow and needs to be extended to surface the backup import option.The Tauri IPC commands
key_backup_read_pubkeyandkey_importalready exist and work correctly; this feature is primarily a UI change.Requirements
KeyImportin settings)onComplete)Design
API / Interface Changes
No new Tauri IPC commands needed. Reuses
key_backup_read_pubkeyandkey_importalready registered inlib.rs.Data Model Changes
None.
Component Changes
client/src/pages/Setup.tsx— add a"backup"view to the existingviewstate union and render the backup import flow. ExtendSetupPropswith anonImportBackupcallback (or call the identity service directly from within Setup).client/src/components/backup/KeyImport.tsx— can be reused as-is or lightly adapted (it already has file picker, pubkey preview, passphrase input, and error feedback). The main change is wiringonImportedto callonComplete.client/src/services/identity.ts— no changes needed;keyImportandkeyBackupReadPubkeyare already exported.Task List
"backup"to theviewstate union inSetup.tsxSetup.tsxview === "backup"— either inline or by embeddingKeyImportwith anonImported→onCompletecallback"choice"without leaving partial stateSeedPhrase.test.tsx/ addSetup.test.tsxto cover the new flowTest List
onComplete.dckbfile, confirm identity loads and authentication to a server worksOpen Questions
KeyImportbe reused directly inSetup.tsx, or should a slimmed-down variant be created to avoid the settings-panel styling in the setup context?