Skip to content

Integrate FreeTrialSubdomainRegistrar and add alpha-agent ENS mint UI (plus mobile IDs and misc fixes)#1470

Open
MontrealAI wants to merge 2 commits intomainfrom
codex/upgrade-agijobmanager-html-to-v27-opw2xn
Open

Integrate FreeTrialSubdomainRegistrar and add alpha-agent ENS mint UI (plus mobile IDs and misc fixes)#1470
MontrealAI wants to merge 2 commits intomainfrom
codex/upgrade-agijobmanager-html-to-v27-opw2xn

Conversation

@MontrealAI
Copy link
Copy Markdown
Owner

Motivation

  • Provide an in-browser, guided flow to mint free-trial *.alpha.agent.agi.eth ENS subnames via the on-chain FreeTrialSubdomainRegistrar and surface registrar state to users.
  • Make registrar management and preview flows robust (validation, availability, parent status, recent names) and safe by adding a transaction review modal before minting.
  • Unify related UX identifiers for the mobile dock/sheet and adjust small protocol/version labels to match the UI version.

Description

  • Added FreeTrialSubdomainRegistrar ABI (including NameRegistered event) and wired up contracts with new runtime state: freeTrialRegistrar, registrarWrapperContract, and APP_STATE.registrar fields.
  • Introduced a minting UI: mintGrid, mintPreview, inline validation (validateAlphaLabelLocal), preview fields (mintAlphaFullName, mintAlphaEnsUri, mintAlphaNode, mintAlphaAvailability, mintAlphaExpectedExpiry), a transaction review modal (alphaMintReviewModal), and a mintAlphaAgentName flow that calls registerSimple.
  • Added registrar admin controls (registrarAdminControls) for parent managers, recent-name persistence under the key agijobmanager_v27_recent_alpha_namesagijobmanager_v26_recent_alpha_names (now RECENT_ALPHA_AGENT_KEY), and functions to refresh and render registrar state (refreshFreeTrialRegistrarState, renderRegistrarAdminControls, updateAlphaMintPreview).
  • Small protocol/UI updates: ensure ENSJobPages getter fallback wording, adjust token/metadata createdVia and packet version to v26, add command palette entry to copy previewed minted name, and improve status copy/paste helpers.
  • Renamed mobile enhancement identifiers and handlers from v27* to v26* across styles and the mobile script to keep naming consistent with the UI version.

Testing

  • No automated tests were added or executed as part of 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: 9e328b78bf

ℹ️ 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(!box) return;
const names = loadRecentAlphaAgentNames();
if(!names.length){ box.innerHTML = '<span class="smallNote">No recent alpha-agent names on this device yet.</span>'; return; }
box.innerHTML = names.map(name=>`<button class="btn" data-alpha-recent="${name}" type="button">${name}.alpha.agent.agi.eth</button>`).join('');
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 Escape recent names before writing them into innerHTML

The recent-name renderer now injects name directly into innerHTML for both element text and the data-alpha-recent attribute, which creates a stored XSS vector if localStorage[RECENT_ALPHA_AGENT_KEY] is ever poisoned (for example by another same-origin script or manual/local tooling edits). This regression is introduced in this commit because the previous path escaped these values before interpolation; keeping this unescaped means a crafted value can break out of the attribute/text context and execute script when the panel renders.

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