Skip to content

fix(persona): create-persona does nothing on a State-A account#135

Merged
stormer78 merged 1 commit into
mainfrom
fix/create-persona-state-a
Jun 17, 2026
Merged

fix(persona): create-persona does nothing on a State-A account#135
stormer78 merged 1 commit into
mainfrom
fix/create-persona-state-a

Conversation

@stormer78

Copy link
Copy Markdown
Contributor

Symptom

In the Create Persona DID overlay, pressing Enter after typing a label did nothing — no progress, no error, no DID. (Reported right after #134 merged.)

Root cause

A State-A account — bootstrapped (VTA + context) but with no persona/community yet — runs run_degraded_loop, not the main runtime loop. That's exactly when you'd create your first persona DID.

The overlay's open and label-edit actions go through the shared handle_nav_action reducer, so they worked (the typed name appeared). But CreatePersonaSubmit / CreatePersonaCopy are loop-local and were only wired into the runtime loop — the degraded loop's catch-all _ => {} silently dropped them.

Fix

Wire both arms into run_degraded_loop, minting via the join context's admin VTA + config (minting needs only the admin session + account context, both present in State-A — ctx.profile == self.profile, so run_create_persona's persist path is correct).

Also documented the dual-loop contract in the nav_reducer_defers_loop_local_arms test so the next loop-local action isn't dropped the same way.

Verification

  • cargo build, cargo clippy --all-targets, and cargo test -p openvtc (160 passed) all clean.
  • Not driven against a live VTA from CI; verified by build/tests + root-cause analysis. Manual check after merge: fresh account → menu "Create Persona DID" → type a label → Enter → progress then the DID.

Follow-up (not in this PR): the runtime and degraded loops duplicate several loop-local arms (StartJoin, DeleteCommunity, now CreatePersona) — a shared loop-local dispatcher would prevent this whole class of "handled in one loop, dropped in the other" bug.

Pressing Enter after entering a label in the create-persona overlay did
nothing for a brand-new account — exactly when you'd create your first
persona DID.

Root cause: a State-A account (bootstrapped, but no persona/community
yet) runs run_degraded_loop, not the runtime loop. The overlay open and
label-edit go through the shared handle_nav_action reducer (so they
worked), but CreatePersonaSubmit/CreatePersonaCopy are loop-local and
were only wired into the runtime loop — the degraded loop's catch-all
silently dropped them.

Wire both arms into run_degraded_loop, minting via the join context's
admin VTA + config (mint needs only the admin session + account context,
both present in State-A). Note the dual-loop contract in the deferral
test so the next loop-local action isn't dropped the same way.

Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
@stormer78 stormer78 requested a review from a team as a code owner June 17, 2026 16:14
@stormer78 stormer78 merged commit ee86c31 into main Jun 17, 2026
6 of 13 checks passed
@stormer78 stormer78 deleted the fix/create-persona-state-a branch June 17, 2026 16:15
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.

1 participant