Edit my public profile
A person sets the display name and summary that everyone sees for their identity, and gets a confirmation once the server has it.

As an identity holder, I want to set the name and short summary people see for me, so that my comments and documents carry my name instead of an identifier.

Situation

I have an identity on this phone. Its rows show a key name or a short id because I never published a profile, or I want to change what I published. I am online, on the Me tab.

What I do

    Open the identity and tap "Edit profile".

    Type a display name and, if I like, a summary.

    Tap "Save".

    Wait for "Profile updated", then tap "Done".

What I should see

    A sheet titled "Edit profile" opens with "Cancel" in the bar. See Edit profile.

    While my profile is fetched it says "Loading profile…".

    A section "Public profile" holds "Display name" (hint "Your name") and "Summary" (hint "A little about you").

    The fields start with what is published. For a first profile the name starts as my key name, if I gave one.

    Under the fields: "Published on hyper.media. Visible to everyone.", naming the server I read from.

    "Save" is a row under the fields. It is disabled while the name is empty, and for a published profile until I change something.

    While saving, the row reads "Saving…", the fields and "Cancel" are disabled.

    On success the phone gives a success tap, "Profile updated" appears above the row, and "Cancel" becomes "Done". The sheet stays open.

    "Done" returns me to Me, where my row shows the new name. Bylines and author pages in Read show it too.

When something goes wrong

    If I clear the name, "Enter a display name." appears in red and "Save" is disabled. I type a name.

    If saving fails, the reason appears in red above "Save", for example "The server refused the profile (500). Try again." My text stays and I tap "Save" again.

    If the profile cannot be loaded, I see the reason with "Retry" and "Change server".

    If this identity's key is not on the phone, I see "This identity is no longer on this device." with "Import identity".

Not included

Trace

Story US-ID-07, status Shipped. These links are kept in step with the traceability matrix and with the "User stories" section of every page listed here.

Design

Page

Part it plays

Edit profile

The sheet: loading, error, form, saved

Identity detail

Entry point: the Edit profile row

Me

Where the new name appears after Done

Import identity sheet

Recovery path when the key is missing

Server

Recovery path through Change server

Author profile

The public page that shows the name and summary

ProfileForm

The form with its fields, messages and Save row

Identity rows

Rows whose label becomes the profile name

Document header and byline

Bylines that show the published name

input, textarea, select and label

The name field and the summary text area

Forms and inputs

Errors wait for an edit; Save is in the form

Every form

Lists this form with every message

States for every screen

Loading, key missing, load failed, saving, save failed, saved

Refresh, haptics and progress

The success haptic and the written confirmation

Stacks, pushes and sheets

A sheet that stays open after saving

Names, not identifiers

Public name versus local key name

Honest state: loading, failure and empty

Confirmed only after the server shows the change

Implementation

Page

Part it plays

Profile: editing name and summary

Loading, publishing, confirming, and the known limits

Me: screens and components

The Edit profile link and the meProfiles names that update

Identity: key storage

signerFor: the key that signs the profile

Crypto: changes, refs, comments and profiles

The signed changes and ref that make up a profile update

Crypto: vendored CBOR and gzip codecs

CBOR encoding of the publish request

Publishing signed blobs

The PublishBlobs request and its responses

Seed site read API

Account, Resource and ListChanges reads before and after the write

Read: API client and superjson decoder

The API client the profile reads go through

Root declarations: Me, Profile, Crypto and Vault

profileData, profileSaved, profileReady and profileError

State, refresh and stale-reply patterns

Stale replies are ignored by account, server and visit; saved profile refreshes names, authors and documents

Navigation and routes

The profile-edit route and profileClose

Where the app yields for the turn budget

The yield between reading history and signing

Contract UI tests

The UI test that publishes twice on the dev server

Bun unit tests

Unit tests for history, refusal and confirmation

Code

File

What

profile.contract L18-59

ProfileScreen

profile.contract L61-118

ProfileForm

me.contract L175-177

Edit profile link on Identity detail

app.contract L239-245

pkg:profile decl

app.contract L670-686

profileClose, profileRetry, profileSave, profileAfterSave

app.contract L880-896

view wiring for the profile-edit route

src/profile/sources.ts L4-11

profileLoad and profilePublish sources

src/profile/load.ts L65-84

loadProfile

src/profile/load.ts L86-138

publishProfile

src/profile/load.ts L20-63

previousProfile

src/crypto/profile.ts L6-50

createProfilePublishBlobs

src/crypto/change.ts

Builds and signs the profile change

src/crypto/ref.ts

Builds the version ref that publishes it

Tests

File

What it checks

profile.test.contract

profile: prefill, validate, publish and reread a public profile on dev

profile.test.contract

profile: a missing key cannot edit or publish

src/profile/__tests__/profile.test.ts

profile history; Account prefills server metadata; empty name and missing private key refuse before any request; network failure and redirects never bootstrap a new home; a successful upload without the new Account metadata is not reported as confirmed; the server can refuse a publish

src/crypto/__tests__/crypto.test.ts

profile blob parity vectors

Delivery

Delivered by #1470.

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Attributes
Epic
Identity
name
Edit my public profile
Story
US-ID-07
Status
Shipped
summary
A person sets the display name and summary that everyone sees for their identity, and gets a confirmation once the server has it.