See and share my account ID, and name my key on this device
A person finds the full account ID of an identity, copies or shares it, and gives the key a local name.

As an identity holder, I want to see my full account ID, hand it to someone, and give the key a name I recognise, so that others can find me and I can tell my identities apart.

Situation

Someone asked for my account ID so they can mention me or give me access. I also have two identities whose short ids look alike. I am on the Me tab with at least one identity.

What I do

    Tap my current identity, or open any identity from Vault.

    Read the "Account ID" section.

    Tap "Copy account ID", or "Share account ID…" and pick where to send it.

    Tap "Key name", type a name, and tap "Save".

What I should see

    A screen titled "Identity" with the avatar, the name, and "Current identity" or "On this device". See Identity detail.

    Under "Account ID", the complete identifier in a fixed width face, wrapping over lines. I can also select it by hand.

    "Copy account ID" puts it on the clipboard and the phone gives a success tap.

    "Share account ID…" opens the system share sheet with the identifier as text.

    A "Key name" row shows the current name, or "None".

    The note below reads "The key name is only on this device. Your public name comes from your profile."

    Tapping "Key name" opens an alert titled "Rename key" with "Letters, numbers, dashes and underscores.", a field, "Save" and "Cancel". The field starts with the present name.

    After "Save" the row shows the new name. If I have no public profile name, the title here and my row on Me change to it too.

    This is the only screen that shows the full identifier. Everywhere else I see names and short ids.

When something goes wrong

    A name with spaces or symbols is refused. The note turns red and reads "Names may only contain letters, numbers, dashes and underscores." I tap "Key name" again and correct it.

    A name another key uses gives "Name already exists, delete it first."

    If the identity was removed meanwhile, the screen shows "This identity is no longer on this device."

Not included

    Copying gives no visible confirmation, only the tap from the phone.

    There is no QR code and no link to my public page from this screen.

    With a remote vault connected, a key name can reach my other devices that have no name for that key, so "only on this device" is not always exact. See Keep my identities in sync across devices.

    The share sheet and clipboard themselves are not checked by an automated test, only that the rows exist. See Contract UI tests.

Trace

Story US-ID-04, 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

Identity detail

The screen with the Account ID section and the Key name row

Me

Entry point: the current identity row

Vault

Entry point: identity rows in the vault list

Identity rows

The header row with avatar, name and subtitle

Avatar

The 56 point avatar in the header

dialog

The Rename key alert with its text field

input, textarea, select and label

The name field inside the alert

Share, copy and open

Copy and share rows and their feedback

Confirmations and alerts

The Rename key alert in the alert inventory

Forms and inputs

Where the rename error appears and how it is coloured

Refresh, haptics and progress

The success haptic on copy

States for every screen

Missing identity, no key name and rename refused states

Names, not identifiers

The one place the full identifier is shown; key name versus public name

What changed from the React Native app and why

Copy and share kept for parity with the earlier app

Typography

Monospace footnote for the identifier

Every symbol

The copy and share symbols

Implementation

Page

Part it plays

Me: identities and servers

Orientation: the package that owns identities

Me: screens and components

MeIdentityScreen, copyId, shareId and the rename actions

Me: sources and import logic

meRenameIdentity

Identity: key storage

renameKey, nameError and where the name is stored

Vault: merge and tombstones

Key names as per-device labels when a vault is connected

Vault: screens and tasks

vaultTrackMe sends a rename to the vault

Root declarations: Me, Profile, Crypto and Vault

meRenameDraft, meRenamed and meRenameError

Navigation and routes

The identity route /me/id/:uid

Contract views and built-in calls

The built-in copyText, share, haptic and showModal calls

Contract UI tests

The UI tests for rename and for the copy and share rows

Bun unit tests

Unit tests for the name rules

Code

File

What

me.contract L132-233

MeIdentityScreen

me.contract L154-159

copyId and shareId

me.contract L181-195

Account ID section, Key name row and its footer

me.contract L215-221

Rename key dialog

app.contract L216

meRenameDraft

app.contract L230-236

meRenamed and meRenameError

app.contract L623-630

meAskRename, meEditRename, meRename

app.contract L871-872

view wiring for the identity route

src/me/sources.ts L108-111

meRenameIdentity

src/identity/index.ts L133-141

renameKey

src/identity/index.ts L155-172

nameError

Tests

File

What it checks

me.test.contract

me: rename the key, refusing a bad name

me.test.contract

me: an unnamed identity shows its short id once, and its account ID copies and shares

me.test.contract

me: identity detail exports the key file after asking, and removes

src/identity/__tests__/identity.test.ts

name rules; shortId

src/identity/__tests__/storage.test.ts

a normal name starting with z6Mk is not mistaken for a principal

src/vault/__tests__/vault.test.ts

a key name is a per-device label: two labels never rewrite the vault, a label fills in where there is none

Delivery

Delivered by #1470.

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

Unsubscribe anytime

Comments