Skip to content

feat(web-console): name peers by petname, self display name or short id - #305

Closed
Mearman wants to merge 7 commits into
mainfrom
feat/console-naming
Closed

Mearman wants to merge 7 commits into
mainfrom
feat/console-naming

Conversation

@Mearman

@Mearman Mearman commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

The console's conversation list, connection directory and discovered-peers table now name a peer by the same three-tier convention instead of a raw device-id: a petname this viewer gave the device, else the display name the device signed about itself, else a short id (the leading 12 hex characters, with a copy button for the full id). The convention lives in peer-names.ts and reaches every surface through PeerNamesContext, so the three tables cannot drift apart.

Petnames are stored under petname/<device-id> in the console's own IndexedDB storage (name-store.ts) and never leave it. A self display name is read from the agent/self extension of a verified peer-advert, which the advert signature already covers. I used that key rather than inventing one because agent-comms publishes its agent name under it and the public hub's advert policy carries exactly that shape (name plus harness), so a console name reaches peers through that hub and agent-comms names show up here. The console publishes its own name (set in the new "Your display name" field) by re-sending its self-advert with that extension once a session is connected and whenever the name changes. Names from peers are trimmed and bounded, since they come from strangers.

Not done: proper names (wire-mesh handles) are not implemented in the protocol yet, so they are not a tier here.

Fixes #295

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-30T19:16:01.481330Z 5f40743 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

A petname is this viewer's own label for a device, kept in the console's
own storage and never gossiped. A self display name is read from the
agent/self entry of a verified advert, the key agent-comms and the public
hub's advert policy already carry, and this console publishes its own
through the same entry. The convention is implemented once in peer-names.ts
and reached through a context by the conversation list, the connection
directory and the discovered-peers table.
…trip control characters from it

PeerName and the conversation labels rendered only the stranger-chosen
name, so two peers claiming one name could not be told apart.
cleanName now drops control and bidirectional formatting characters and
truncates by code point.
…nd trim a name after the length cut

A self name is shown in italics under a 'calls itself' marker and flagged
when it equals a petname the viewer holds for any device. cleanName trims
after truncating so a cut after a space leaves no trailing space, and the
Save button compares the draft with its cleaned form.
…es context

ConnectionPanel now reads peer names through PeerNamesProvider, so the
local-network explanation test, written before names existed, has to mount
the panel the way the app does.
@Mearman
Mearman force-pushed the feat/console-naming branch from 1260305 to f659e79 Compare October 1, 2026 08:58
@Mearman
Mearman enabled auto-merge (rebase) October 1, 2026 08:58
@Mearman

Mearman commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

These commits landed in main as part of #316, which carried the whole console stack as one branch so it needed a single CI cycle against a moving main.

@Mearman Mearman closed this Oct 1, 2026
auto-merge was automatically disabled October 1, 2026 09:57

Pull request was closed

@Mearman
Mearman deleted the feat/console-naming branch October 1, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Console naming: petnames, self display names and short ids

1 participant