feat(console): pick a persona from a list, or mint one on the spot - #181
Merged
Conversation
Step three of the guided setup asked a first-time holder to type a DID they did not have. In a context that publishes none — agent-memory, in the report — the field was an empty box with a placeholder and a pointer to another pane, which is where the flow ended. **The list leads now, and free text is one option inside it.** #165 made this a `datalist` over a text field, reasoning that a persona DID need not be a published `did:webvh` — a v4 holder is a `did:key` the VTA mints, peers are `did:peer` — and a `<select>` would refuse all of them. That reasoning holds and the control was still wrong: it made the unusual case the default question. The dropdown carries the context's published identifiers and the personas already known there, plus "— another DID, typed —", which reveals the field and offers a way back. **A context with none can make one.** `serverId` is what that needs: omitting it means *serverless*, where the caller serves the log itself at a `url`, so this asks the agent which hosting servers it can publish through and uses the one when there is one. The DID lands selected and the list reloads around it. No server registered is the one case that genuinely belongs in the DIDs pane, and it says so rather than failing. The created DID is not portable — it lives where it is published — and the button says so beside itself, because that decides once and for all whether the DID may ever move and a guided flow should not make an irreversible choice quietly. Changing an existing binding shows the persona as text rather than a picker: that field was already disabled, and a disabled select reads as a control that failed to load. Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step three asked a first-time holder to type a DID they did not have. In
agent-memory, which publishes none, the field was an empty box with a placeholder and a pointer to another pane — so the guided setup ended there.The list leads; free text is an option inside it
#165 deliberately made this a
datalistover a text field: a persona DID need not be one of the context's publisheddid:webvhidentifiers — a v4 holder is adid:keythe VTA mints, peers are reached atdid:peer— and a<select>would refuse all of those.That reasoning still holds, and the control was still wrong. It made the unusual case the default question and left the common one unanswered. Now:
The unusual identifiers stay reachable. They stop being what the form asks first.
A context with none can make one
This is the part that unblocks the flow.
serverIdis what a create needs — omitting it means serverless, where the caller serves the log itself at aurl, which is not what this flow wants — so the picker asks the agent which hosting servers it can publish through and uses the one when there is one. The new DID lands selected and the suggestion list reloads around it.Three states, each said plainly:
The created DID is not portable — it lives where it is published — and the button says so beside itself. That decides once and for all whether the DID may ever move, and a guided flow should not make an irreversible choice quietly; the DIDs pane is where to choose otherwise.
Changing an existing binding
Shows the persona as text rather than a picker. The field was already disabled there, and a disabled
<select>reads as a control that failed to load.Verification
npm run lint,npm run build,npm test— 849 across four workspaces. All sixci.ymlassertions against the real build. The now-deadDID_SUGGESTIONSdatalist id is removed.Not exercised: no renderer here, so the create path is reasoned from
vta/webvh/dids/create/1.0's contract rather than watched. Worth running step three in a context with no DIDs, which is the case it was built for.