fix(persona): create-persona does nothing on a State-A account#135
Merged
Conversation
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>
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.
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_actionreducer, so they worked (the typed name appeared). ButCreatePersonaSubmit/CreatePersonaCopyare 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, sorun_create_persona's persist path is correct).Also documented the dual-loop contract in the
nav_reducer_defers_loop_local_armstest so the next loop-local action isn't dropped the same way.Verification
cargo build,cargo clippy --all-targets, andcargo test -p openvtc(160 passed) all clean.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.