Bug + UX: Seed phrase never shown after identity creation; replace with key safety screen #41
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#41
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#53
Original Author: @icub3d
Original Date: 2026-04-16T18:13:01Z
Bug + UX: Seed phrase never shown after identity creation; replace with key safety screen
Bug
After clicking "Create New Identity" the seed phrase screen (
SeedPhrase.tsx) is never rendered. The root cause is a race condition inuseIdentity.ts:Affected file:
client/src/hooks/useIdentity.ts,client/src/pages/Setup.tsx,client/src/App.tsxProposed Fix + UX Redesign
Rather than patching the race condition in isolation, replace the current post-generation
SeedPhrasescreen with a Key Safety screen that is shown immediately after a new identity is created, beforehasIdentityis set true in the parent. The screen makes the stakes clear and gives the user concrete actions to protect their key.Key Safety Screen behaviour
Setup.tsxbefore callingonComplete()(sohasIdentityis not yet true in the parent and the component stays mounted)key_exportIPC (same flow asKeyExport.tsx) so they can save a.dckbfile right nowonComplete()to finish setup — ideally requiring the user to acknowledge they have saved at least one form of backup, though a simple confirm is acceptable to startFix to the race condition
Move
setHasIdentity(true)to after the seed/safety screen is dismissed (i.e., insideonComplete), not insidegenerateIdentity. Alternatively,generateIdentitycan return theIdentityInfowithout updatinghasIdentity— the identity check that followsonCompletewill pick it up naturally.Requirements
SeedPhrase.tsxwith a Key Safety screen that surfaces both recovery optionsKeyExport.tsx(can embed or reuse the component)addingAccount === true)SeedPhrase.tsxcomponent can be removed or repurposedDesign
Component Changes
client/src/pages/Setup.tsx— add"safety"view; pass generatedIdentityInfointo it; callonComplete()only from the safety screen's confirm buttonclient/src/pages/KeySafety.tsx(new) — safety screen combining seed phrase display and backup exportclient/src/hooks/useIdentity.ts—generateIdentityshould not callsetHasIdentity(true); let the caller drive state afteronCompleteclient/src/pages/SeedPhrase.tsx— can be deleted onceKeySafety.tsxcovers its functionalityNo server or Tauri core changes required.
Task List
generateIdentityinuseIdentity.tsso it does not sethasIdentity = truebefore the safety screen is dismissed"safety"view state toSetup.tsx, store the generatedIdentityInfoin local state, renderKeySafetywith itclient/src/pages/KeySafety.tsx: warning copy, seed phrase grid with copy button, embedded export (passphrase + file save), and confirm buttononCompleteso it is only called after the user confirms from the safety screenSeedPhrase.tsx(or keep as a dumb display sub-component used byKeySafety)Test List
onCompleteis not called until the user clicks confirm on the safety screen.dckbbackup from the safety screen, clear the keychain, import the backup, confirm the same pubkey is restoredOpen Questions
KeySafety.tsxbe underpages/orcomponents/setup/?