Skip to content

Refine v43 Alpha identity review modal and state coherence#192

Open
MontrealAI wants to merge 2 commits into
mainfrom
codex/patch-alpha-agent-console-ui-for-mainnet-6evoyf
Open

Refine v43 Alpha identity review modal and state coherence#192
MontrealAI wants to merge 2 commits into
mainfrom
codex/patch-alpha-agent-console-ui-for-mainnet-6evoyf

Conversation

@MontrealAI

Copy link
Copy Markdown
Owner

Motivation

  • Replace the functional-but-debuggy Alpha-Agent transaction review surface with a single, executive, contract-faithful signing surface that removes debug noise and fixes mobile/footer, accessibility, and state-gating failures.
  • Ensure the public registration path remains direct and auditable (calls register(string) on FreeTrialSubdomainRegistrarIdentity with value = 0) and that preview/root reads deterministically drive the UI.

Description

  • Redesigned the Alpha identity review modal HTML/CSS into a premium “authorization memorandum” with a stronger hero header, decision-summary strip, human-centric action facts, operational readiness, and an Advanced technical facts disclosure that demotes raw calldata.
  • Hardened the identity state model and normalized snapshot by adding read_failed, preview_inconsistent, and review_open states and expanding snapshot metadata (previewStatus, previewStatusLabel, rootUsable, termsAccepted, preflightVerdict, recommendedMethod) to drive all identity panels and gating.
  • Enforced pre-open gating so the modal cannot open unless preview(label) is fresh and coherent, and return clear, non-blank guidance when reads are missing or inconsistent.
  • Improved accessibility and interaction: focus trap for Tab, focus restore on close, larger/semantically labeled close control, clarified CTA labels, sticky footer safe-area handling on mobile, and keyboard/ESC behavior.
  • Kept the public write path contract-faithful and explicit: public flows call freeTrialRegistrarIdentity.methods.register(local.label).send({from:userAccount, value:'0'}) (and equivalent claimIdentity/syncIdentityByLabel), and parity metadata is recorded in APP_STATE.identity.parity.
  • Updated the single-file artifact test and runbook wording to reflect the canonical review surface and enriched snapshot fields.

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

  • Ran the artifact unit/regression test for the v43 standalone file with cd ui && npm run test -- tests/standaloneV43.test.ts, which passed (12/12).
  • The updated test file ui/tests/standaloneV43.test.ts was adjusted to assert the new modal copy, state names, snapshot fields, and accessibility helper presence, and those assertions passed.
  • Verified the register/claim/sync .send({from:userAccount, value:'0'}) call sites and the presence of parity metadata in the artifact.

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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(); }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant