Refine v43 Alpha identity review modal and state coherence#192
Refine v43 Alpha identity review modal and state coherence#192MontrealAI wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9de5daaf19
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| syncModalState(); | ||
| } | ||
| function closeAlphaIdentityReview(){ const m=el('alphaIdentityReviewModal'); if(m){ m.classList.remove('open'); m.setAttribute('aria-hidden','true'); } if(el('confirmAlphaIdentityReviewBtn')) el('confirmAlphaIdentityReviewBtn').textContent = 'Authorize on mainnet'; syncModalState(); } | ||
| function closeAlphaIdentityReview(){ const m=el('alphaIdentityReviewModal'); if(m){ m.classList.remove('open'); m.setAttribute('aria-hidden','true'); } if(el('confirmAlphaIdentityReviewBtn')) el('confirmAlphaIdentityReviewBtn').textContent = 'Authorize on Ethereum mainnet'; if(APP_STATE.identity?.lastFocusedBeforeReview?.focus){ setTimeout(()=>APP_STATE.identity.lastFocusedBeforeReview.focus(), 20); } syncModalState(); } |
There was a problem hiding this comment.
Gate focus restore on review modal actually closing
closeAlphaIdentityReview() now always runs a delayed lastFocusedBeforeReview.focus() even when the review modal was never open. Because the global keydown handler calls this function on every Escape, pressing Escape anywhere after one successful modal open will repeatedly yank focus back to the stale element, interfering with other dialogs and keyboard navigation. Restore focus only when the modal is currently open (and clear lastFocusedBeforeReview after use).
Useful? React with 👍 / 👎.
Motivation
register(string)onFreeTrialSubdomainRegistrarIdentitywithvalue = 0) and that preview/root reads deterministically drive the UI.Description
Advanced technical factsdisclosure that demotes raw calldata.read_failed,preview_inconsistent, andreview_openstates and expanding snapshot metadata (previewStatus,previewStatusLabel,rootUsable,termsAccepted,preflightVerdict,recommendedMethod) to drive all identity panels and gating.preview(label)is fresh and coherent, and return clear, non-blank guidance when reads are missing or inconsistent.freeTrialRegistrarIdentity.methods.register(local.label).send({from:userAccount, value:'0'})(and equivalentclaimIdentity/syncIdentityByLabel), and parity metadata is recorded inAPP_STATE.identity.parity.Files changed:
ui/agijobmanager_genesis_job_mainnet_2026-03-05-v43.html,ui/tests/standaloneV43.test.ts,docs/ui/GENESIS_JOB_MAINNET_HTML_UI.md.Testing
cd ui && npm run test -- tests/standaloneV43.test.ts, which passed (12/12).ui/tests/standaloneV43.test.tswas adjusted to assert the new modal copy, state names, snapshot fields, and accessibility helper presence, and those assertions passed.register/claim/sync.send({from:userAccount, value:'0'})call sites and the presence of parity metadata in the artifact.Codex Task