Skip to content

Add FreeTrialSubdomainRegistrar alpha-agent mint UI and registrar integration; ABI & mobile script refactor#1469

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

Add FreeTrialSubdomainRegistrar alpha-agent mint UI and registrar integration; ABI & mobile script refactor#1469
MontrealAI wants to merge 2 commits into
mainfrom
codex/upgrade-agijobmanager-html-to-v27-nrtwn6

Conversation

@MontrealAI
Copy link
Copy Markdown
Owner

Motivation

  • Provide an in-browser flow to mint free-trial *.alpha.agent.agi.eth ENS subnames via the on-chain FreeTrialSubdomainRegistrar and make the registrar state and availability checks first-class in the UI.
  • Replace fragile expert-only register paths with a safer preview/review + registerSimple flow and persist recent names locally for convenience.
  • Align ABIs and auxiliary hooks to match on-chain contract signatures and improve ENSJobPages preview reliability.
  • Standardize mobile dock/sheet identifiers and downgrade the UI version string where appropriate to match packaging.

Description

  • Added a new minting panel and UI controls for alpha-agent free-trial names: mintGrid, mintPreview, mintAlphaLabel, mintAlphaRecipient, mintAlphaAgentBtn, mintAlphaStatus, recentAlphaAgentNames, and an alphaMintReviewModal for transaction review.
  • Integrated FreeTrialSubdomainRegistrar contract: added FreeTrialSubdomainRegistrarABI (including NameRegistered event), new constants (FREE_TRIAL_REGISTRAR, ALPHA_AGENT_PARENT, ALPHA_AGENT_PARENT_NODE), registrar wrapper handling, parent status reads, label validation, availability checks (available) and trial expiry display.
  • Reworked client-side alpha-label handling: introduced normalizeAlphaLabel, validateAlphaLabelLocal, improved timestamp formatting via formatTimestamp, updated recent-name localStorage key to agijobmanager_v27_recent_alpha_names, and functions to load/save/render recent names.
  • Replaced the previous expert/advanced register UI with a simpler, safer flow: preview → open review modal → registerSimple(parentNode,label,recipient) and added mintAlphaAgentName to run tracked txs and handle NameRegistered event outcomes.
  • ABI and ENS job preview updates: adjusted MIN_LABEL_LENGTH/MAX_LABEL_LENGTH ABI types, added ENSJobPages getters (jobEnsLabel, jobEnsName, jobEnsURI, jobEnsNode) and improved ENS preview messaging.
  • Miscellaneous UX, safety and housekeeping: tightened validation messages, updated various status messaging, changed internal build/version strings from v27v26 in a few places, and renamed mobile enhancement IDs/classes and script content from v27v26 (dock/sheet element and handler renames) to keep mobile shell consistent.

Testing

  • No automated tests were run as part of this changeset; changes are primarily UI/JS front-end additions and ABI updates and should be validated via manual QA in a local/dev environment before production deployment.

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: 77c9aaad55

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

{"inputs":[{"internalType":"bytes32","name":"parentNode","type":"bytes32"}],"name":"getParentStatus","outputs":[{"internalType":"bool","name":"active","type":"bool"},{"internalType":"bool","name":"parentLocked","type":"bool"},{"internalType":"bool","name":"registrarAuthorised","type":"bool"},{"internalType":"bool","name":"parentUsable","type":"bool"},{"internalType":"uint64","name":"parentEffectiveExpiry","type":"uint64"}],"stateMutability":"view","type":"function"},
{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"available","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},
{"inputs":[{"internalType":"string","name":"label","type":"string"}],"name":"validateLabel","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},
{"inputs":[{"internalType":"string","name":"label","type":"string"}],"name":"validateLabel","outputs":[],"stateMutability":"view","type":"function"},
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore boolean output for validateLabel

FreeTrialSubdomainRegistrarABI now declares validateLabel with outputs: [], but the deployed registrar at FREE_TRIAL_REGISTRAR returns a boolean, so Web3 decodes .call() to an empty object instead of true/false; in updateAlphaMintPreview, that object path is treated as valid (isContractValid = true), which suppresses registrar-side invalid-label feedback and can let users attempt registerSimple on labels the contract would reject.

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