Skip to content

Add FreeTrialSubdomainRegistrar mint UI and registrar integration; mobile v26 refactor#1471

Open
MontrealAI wants to merge 2 commits into
mainfrom
codex/upgrade-agijobmanager-html-to-v27-2a9zuv
Open

Add FreeTrialSubdomainRegistrar mint UI and registrar integration; mobile v26 refactor#1471
MontrealAI wants to merge 2 commits into
mainfrom
codex/upgrade-agijobmanager-html-to-v27-2a9zuv

Conversation

@MontrealAI
Copy link
Copy Markdown
Owner

Motivation

  • Surface an in-browser flow to claim free-trial *.alpha.agent.agi.eth ENS names backed by the on-chain FreeTrialSubdomainRegistrar and make minting, preview and verification accessible to users.
  • Improve registrar state reads and make parent/manager posture explicit so the UI can safely enable/disable mint actions.
  • Standardize a mobile dock/sheet version identifier and selectors (renaming v27 → v26) to keep the mobile enhancements consistent with this release.

Description

  • Added a minting UI: a mintGrid input panel, mintPreview summary, inline validation (mintLabelValidation) and a modal review alphaMintReviewModal with openAlphaMintReview/closeAlphaMintReview flows and mintAlphaAgentName to perform registerSimple on the registrar.
  • Integrated FreeTrialSubdomainRegistrar ABI and contract reads, added refreshFreeTrialRegistrarState to populate wrapper, trial period, label rules and parent status, and rendered registrar admin controls for authorized parent managers via renderRegistrarAdminControls.
  • Reworked label handling and validation: added normalizeAlphaLabel, validateAlphaLabelLocal, improved availability/contract validation logic and replaced numerous legacy functions/keys (localStorage key renamed to RECENT_ALPHA_AGENT_KEY and recent-name rendering updated).
  • Miscellaneous UI and JS updates: stored registrar wrapper in APP_STATE.registrar, added freeTrial contract variables, wired command palette and mission actions to new mint flows, updated metadata/version strings (createdVia and buildPacketBase from v27v26), and refactored mobile enhancement identifiers and classes from v27v26 (CSS IDs, JS handlers and sheet/dock markup) for the release.

Testing

  • No automated tests were run for this change.

Codex Task

Copy link
Copy Markdown

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

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: 62e448a691

ℹ️ 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".

if(!local.ok) return setToast(local.reason, 'warn');
const recipient = String(el('mintAlphaRecipient')?.value || '').trim() || userAccount;
if(!web3.utils.isAddress(recipient)) return setToast('Recipient address is invalid.', 'bad');
const available = await freeTrialRegistrar.methods.available(namehash(`${local.label}.${ALPHA_AGENT_PARENT}`)).call().catch(()=>false);
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 Guard mint call when registrar contract is uninitialized

The confirm step dereferences freeTrialRegistrar directly, so if the earlier full refresh fails before refreshFreeTrialRegistrarState() runs (for example, any prior read in refreshAll() throws), this path throws a TypeError instead of giving a recoverable UX path. That leaves users on mainnet with terms accepted unable to mint until they manually discover they must refresh registrar state first.

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