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:
Scott Reimers 2026-05-14 22:32:30 -06:00
parent f714a17385
commit 346d23d4d8
3 changed files with 79 additions and 30 deletions

View file

@ -231,13 +231,13 @@
<button id="check-updates-btn" class="btn btn-ghost btn-sm" style="margin-top:0.5rem">Check now</button>
</div>
<div class="section-card" style="text-align:center">
<h3 style="margin-bottom:0.5rem">Identities</h3>
<div id="identities-list" style="margin-bottom:0.5rem"></div>
<div style="display:flex;gap:0.5rem;justify-content:center;flex-wrap:wrap">
<button id="create-identity-btn" class="btn btn-ghost btn-sm">New Identity</button>
<button id="import-identity-btn" class="btn btn-ghost btn-sm">Import Key</button>
</div>
<div class="section-card" style="text-align:left">
<h3 style="margin-bottom:0.4rem;text-align:center">Your data on this device</h3>
<p class="empty-hint" style="margin-bottom:0.5rem;font-size:0.78rem;line-height:1.5">
<strong style="color:#7fdbca">Personas</strong> are who you are to peers &mdash; the keys you post and message with. Most people only need one. To move your account to a new device, you <em>export your personas</em> from this device and <em>import them</em> on the new one.
<br><br>
<strong style="color:#888">Identities</strong> below are this device's own network address &mdash; usually not what you want to move. Leave them alone unless you know why you're touching them.
</p>
</div>
<div class="section-card" style="text-align:center">
@ -248,9 +248,25 @@
</div>
<div class="section-card" style="text-align:center">
<h3 style="margin-bottom:0.4rem">Move to another device</h3>
<p class="empty-hint" style="margin-bottom:0.5rem;font-size:0.78rem">
Export creates a ZIP containing your personas (and optionally posts/follows). Import on the other device's Settings &gt; Move to another device.
</p>
<div style="display:flex;gap:0.5rem;justify-content:center;flex-wrap:wrap">
<button id="export-btn" class="btn btn-ghost btn-sm">Export</button>
<button id="import-btn" class="btn btn-ghost btn-sm">Import</button>
<button id="export-btn" class="btn btn-primary btn-sm">Export personas</button>
<button id="import-btn" class="btn btn-ghost btn-sm">Import from another device</button>
</div>
</div>
<div class="section-card" style="text-align:center">
<h3 style="margin-bottom:0.4rem;font-size:0.85rem;color:#888">Identities (advanced)</h3>
<p class="empty-hint" style="margin-bottom:0.5rem;font-size:0.72rem">
This device's network address. Changing this is rarely useful &mdash; it lets you move the device's QUIC endpoint, NOT your posting identity.
</p>
<div id="identities-list" style="margin-bottom:0.5rem"></div>
<div style="display:flex;gap:0.5rem;justify-content:center;flex-wrap:wrap">
<button id="create-identity-btn" class="btn btn-ghost btn-sm">New Identity</button>
<button id="import-identity-btn" class="btn btn-ghost btn-sm">Import Key</button>
</div>
</div>