ux: Friend-button default + profile-rename plumbing + export/import clarity
Three of the v0.7.0 device-testing feedback items, deferred for later rebuild/redeploy (Scott opted to batch UI fixes). (#1) Friend button on bio modal: - Primary action when neither following nor vouched: [Friend] (= follow + vouch in one click) plus secondary [Follow only]. - When following without a vouch: [Add Vouch] primary, [Unfollow] secondary. - When both follow + vouch (= friends): [Unfriend] (= revoke vouch + unfollow, with the rotation-cost confirm wording). - The standalone [Vouch] / [Revoke Vouch] flows stay reachable from the existing Vouches list in Settings. (#2) Profile shows "unnamed" — bug fix: - set_profile updated the profiles table + emitted a profile post, but never updated posting_identities.display_name. list_posting_ identities returns from the latter, so the Personas list kept showing "(unnamed)" forever after the first-run auto-persona was named. - Now set_profile also upserts the posting_identities row with the new display_name (secret_seed + created_at preserved). (#5) Export/import + persona-vs-device clarity: - Settings reorder: new "Your data on this device" explainer card up top (Personas = who you are to peers; Identities = device's network address, rarely useful to touch). - "Move to another device" section renamed + given a plain-English description; primary [Export personas] / [Import from another device] buttons. - "Identities (advanced)" demoted below; warning text added. - Export wizard heading: "Export your personas"; radio labels use persona/keys language consistently. - Import wizard heading: "Import from another device"; explainer notes that the default action restores personas. Tracking memory created at memory/project_v071_followups.md for deferred items (#4 PQ vouch delivery, #6 rename, #7 redundancy, #8/#9/#10 awaiting clarification). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f714a17385
commit
346d23d4d8
3 changed files with 79 additions and 30 deletions
|
|
@ -1793,6 +1793,20 @@ impl Node {
|
|||
}
|
||||
}
|
||||
}
|
||||
// Keep posting_identities.display_name in sync with the
|
||||
// profile post so the Personas list and any UI reading
|
||||
// PostingIdentity sees the current name (not the original
|
||||
// empty/auto-gen one). The upsert preserves the persona's
|
||||
// secret_seed / created_at; only display_name changes.
|
||||
if let Ok(Some(existing)) = storage.get_posting_identity(&posting_id) {
|
||||
let updated = crate::types::PostingIdentity {
|
||||
node_id: existing.node_id,
|
||||
secret_seed: existing.secret_seed,
|
||||
display_name: display_name.clone(),
|
||||
created_at: existing.created_at,
|
||||
};
|
||||
let _ = storage.upsert_posting_identity(&updated);
|
||||
}
|
||||
}
|
||||
|
||||
// Propagate via neighbor-manifest header diffs like any other post.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue