Harden Alpha identity review UX and canonical state flow in v43 - #189
Harden Alpha identity review UX and canonical state flow in v43#189MontrealAI wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e233abff00
ℹ️ 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".
| node.innerHTML = rows.map(([k,v])=>`<div class="alphaReviewRow"><span class="k">${escapeHtml(k)}</span><span class="v">${v}</span></div>`).join(''); | ||
| node.querySelectorAll('[data-copy-value]').forEach((btn)=>btn.addEventListener('click', ()=>{ | ||
| const value = btn.getAttribute('data-copy-value') || ''; | ||
| navigator.clipboard?.writeText(value).then(()=>setToast('Copied to clipboard.','ok')).catch(()=>setToast('Clipboard unavailable in this browser.','warn')); |
There was a problem hiding this comment.
Guard clipboard copy path before chaining promise
When the Clipboard API is unavailable (e.g., insecure context or unsupported browser/webview), navigator.clipboard?.writeText(value) evaluates to undefined, so chaining .then(...) throws a runtime TypeError before the fallback toast can run. This means clicking the new review-modal Copy button can fail noisily instead of degrading gracefully in exactly the environments where this fallback is needed.
Useful? React with 👍 / 👎.
Motivation
register(string)on the pinned identity contract withvalue = 0).Description
ui/agijobmanager_genesis_job_mainnet_2026-03-05-v43.htmlthat contains: hero header, route/source badges, decision summary strip, human-centric action facts, readiness section, and a collapsed "Advanced technical facts" area for selectors/calldata..alphaIdentityExecutiveModal,.alphaReviewHero,.alphaReviewSection, etc.) to improve contrast, hierarchy, spacing, and mobile-safe-area behaviour.formatIdentityReviewAddressandrenderIdentityReviewListhelper functions.register,claimIdentity, andsyncIdentityByLabelflows; legacy hidden controls remain inert and quarantined.openAlphaIdentityReviewnow blocks untilpreview(label)androotHealth()are fresh and consistent, and rejects opening whenpreviewshows inconsistencies (prevents blank critical fields in review).read_failed,preview_ready,preview_inconsistent,review_open,write_ready, etc.) and ensuredAPP_STATE.identity.snapshotis the single normalized snapshot used across decision UI and modal preflight.APP_STATE.identity.parityso the review recordscontract,method,args,value:'0',chainId,from, andcalldatafor proof-of-parity with on-chain calls.ui/tests/standaloneV43.test.ts.Files changed:
ui/agijobmanager_genesis_job_mainnet_2026-03-05-v43.html— modal markup, CSS, helper functions, gating/state changes, parity recording, advanced facts demotion.ui/tests/standaloneV43.test.ts— assertions updated to reflect state-name and markup changes.Testing
npx vitest run ui/tests/standaloneV43.test.tsand it passed:Tests 10 passed (10).freeTrialRegistrarIdentity.methods.register(local.label).send({from:userAccount, value:'0'}), that parity metadata is recorded, and that the deterministic state machine names are present and consistent.Codex Task