Integrate FreeTrialSubdomainRegistrar and add alpha-agent ENS mint UI (plus mobile IDs and misc fixes)#1470
Conversation
There was a problem hiding this comment.
💡 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(''); |
There was a problem hiding this comment.
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 👍 / 👎.
Motivation
*.alpha.agent.agi.ethENS subnames via the on-chainFreeTrialSubdomainRegistrarand surface registrar state to users.Description
FreeTrialSubdomainRegistrarABI (includingNameRegisteredevent) and wired up contracts with new runtime state:freeTrialRegistrar,registrarWrapperContract, andAPP_STATE.registrarfields.mintGrid,mintPreview, inline validation (validateAlphaLabelLocal), preview fields (mintAlphaFullName,mintAlphaEnsUri,mintAlphaNode,mintAlphaAvailability,mintAlphaExpectedExpiry), a transaction review modal (alphaMintReviewModal), and amintAlphaAgentNameflow that callsregisterSimple.registrarAdminControls) for parent managers, recent-name persistence under the keyagijobmanager_v27_recent_alpha_names→agijobmanager_v26_recent_alpha_names(nowRECENT_ALPHA_AGENT_KEY), and functions to refresh and render registrar state (refreshFreeTrialRegistrarState,renderRegistrarAdminControls,updateAlphaMintPreview).createdViaand packetversiontov26, add command palette entry to copy previewed minted name, and improve status copy/paste helpers.v27*tov26*across styles and the mobile script to keep naming consistent with the UI version.Testing
Codex Task