Skip to content

AGIJobManager UI v26: ENSJobPages resolution & ENS preview hardening, admin modal, ABI expansion, mobile polish#1458

Open
MontrealAI wants to merge 2 commits into
mainfrom
codex/upgrade-agijobmanager-html-to-v26-4k9vvz
Open

AGIJobManager UI v26: ENSJobPages resolution & ENS preview hardening, admin modal, ABI expansion, mobile polish#1458
MontrealAI wants to merge 2 commits into
mainfrom
codex/upgrade-agijobmanager-html-to-v26-4k9vvz

Conversation

@MontrealAI
Copy link
Copy Markdown
Owner

Motivation

  • Fix the stale ENS wiring and incorrect job label preview by making ENSJobPages address resolution contract-faithful and by surfacing honest snapshot semantics for ENS labels.
  • Eliminate fragile fallbacks and native dialogs so admin flows are auditable, typed, and mobile-friendly while preserving the single-file, mainnet-first UI posture.
  • Improve ABI coverage so the UI can read and operate the full admin/control surface for both AGIJobManager and ENSJobPages as required by the protocol model.

Description

  • Replaced the hardcoded old ENSJobPages address and added a centralized resolution flow: resolveEnsJobPagesContract() now reads agiJobManager.methods.ensJobPages().call() and sets resolvedEnsJobPagesAddress and resolvedEnsJobPagesSource with clear labels; only in degraded state does the UI use the verified fallback KNOWN_ENS_JOB_PAGES_FALLBACK = "0x06188e77c1c38d392b16d9d9fb24673363ce1da0".
  • Rebuilt and expanded ABIs: added full ENSJobPages view/write methods (including jobLabelPrefix, jobLabelSnapshot tuple, jobEnsLabel, jobEnsName, jobEnsURI, jobEnsNode, owner and registry/wrapper/resolver getters, and owner-only operational methods) and extended AGIJobManagerABI coverage for required reads and admin methods used by the UI.
  • Reworked ENS Job Page Preview: updateEnsJobPagePreview() now resolves live ENSJobPages address, instantiates the contract at that address, reads nextJobId, jobLabelSnapshot(nextJobId) (tuple semantics), jobEnsLabel, jobEnsName, jobEnsURI, jobEnsNode, jobLabelPrefix, owner, registry, nameWrapper, public resolver, useEnsJobTokenURI, and configLocked, and renders an explicit Snapshot status, Effective label, Effective ENS name/URI/node, and Address source (AGIJobManager getter / verified fallback / unavailable). The code never invents job- labels; it uses contract reads and jobLabelPrefix only as a last-resort when public reads are unavailable.
  • Removed synthetic job-ID generation when event indexing fails and replaced it with a clearly labeled degraded-read posture; the UI no longer fabricates active job IDs from nextJobId.
  • Removed all native browser dialogs (prompt(), alert(), confirm()) and replaced admin argument collection with a typed in-page adminArgsModal and a structured collectAdminArgs() + requestActionConfirmation() review flow before sending transactions.
  • Rewrote admin UI wiring so ENS and AGI admin surfaces use the same resolved ENSJobPages address and show owner/address/source and a richer public-readiness summary (public prerequisites satisfied / incomplete; internal readiness is not provable publicly).
  • Mobile and UX hardening: added mobile dock and sheet (v26MobileDock / v26MobileSheet) improvements and ensured preview/admin cards and modals are responsive and do not overflow on narrow screens; updated visible copy to v26.
  • Minor utilities and safety: added isZeroAddress(), clearEnsPreview(), robust tuple-parsing for jobLabelSnapshot, and conservative runSafeReadStep() usage for RPC resilience.

Testing

  • Checked artifact exists with test -f ui/agijobmanager_genesis_job_mainnet_2026-03-05-v26.html (succeeded).
  • Verified removal/replacement of stale and unsafe constructs by rg searches: no occurrences of the old address 0xc19A84D10ed28c2642EfDA532eC7f3dD88E5ed94 remain and no leftover prompt() / alert() / confirm() calls (search checks succeeded).
  • Performed a JS syntax check by extracting the final inline script and running node --check on it (succeeded).
  • Attempted automated UI render capture via Playwright in this environment (failed to load local file:// path due to container file:// resolution limits); this is an environment tooling limitation, not a code regression.
  • Runtime contract-read behaviors were implemented with defensive runSafeReadStep() patterns and tested via local read-call flows in the script; the UI now clearly indicates degraded state when RPC reads fail, instead of silently fabricating values.

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: c79538449b

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

function useEnsUriPreview(){
const uri = (el("predictedEnsURI")?.textContent || "").trim();
if(!uri || uri === "—"){ setToast("No ENS URI preview available.", "warn"); return; }
navigator.clipboard.writeText(uri)
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 Resolve ENS contract before reading job ENS visibility

fetchEnsVisibility unconditionally calls clearEnsPreview(...) on entry (the call is outside the if braces), and clearEnsPreview nulls ensJobPages; the very next ensJobPages.methods... calls then throw and the catch block returns empty data. In practice this makes job detail ENS fields (name/URI/node/text records) fail to load every time, even when ENSJobPages had already been resolved.

Useful? React with 👍 / 👎.

function useEnsUriPreview(){
const uri = (el("predictedEnsURI")?.textContent || "").trim();
if(!uri || uri === "—"){ setToast("No ENS URI preview available.", "warn"); return; }
navigator.clipboard.writeText(uri)
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 Remove unsupported manager admin method from controls

The manager routine controls now include setUseEnsJobTokenURI, but AGIJobManagerABI in this file does not define that function. When this button is used, executeAdminControl tries to invoke contract.methods[method](...) and hits an undefined method at runtime, so the admin action cannot be submitted.

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