Skip to content

v26 standalone HTML hardening: live ENSJobPages resolution + contract-faithful ENS/admin fixes#1456

Open
MontrealAI wants to merge 1 commit into
mainfrom
codex/upgrade-agijobmanager-html-to-v26
Open

v26 standalone HTML hardening: live ENSJobPages resolution + contract-faithful ENS/admin fixes#1456
MontrealAI wants to merge 1 commit into
mainfrom
codex/upgrade-agijobmanager-html-to-v26

Conversation

@MontrealAI
Copy link
Copy Markdown
Owner

Motivation

  • Correct incorrect ENS job-page wiring and stale preview behavior by making the UI treat AGIJobManager.ensJobPages() as the live source-of-truth and only using the verified fallback 0x06188e77c1c38d392b16d9d9fb24673363ce1da0 in degraded state.
  • Harden the single-file mainnet UI for production: remove unsafe native dialogs, avoid synthetic job-ID fabrication, and make ENS/admin surfaces contract-faithful while preserving the existing feature set and visual tone.

Description

  • Replaced stale hardcoded ENS address and added a centralized resolution flow: resolveEnsJobPagesContract() reads agiJobManager.methods.ensJobPages().call() and sets resolvedEnsJobPagesAddress / resolvedEnsJobPagesSource, falling back only to KNOWN_ENS_JOB_PAGES_FALLBACK in degraded state.
  • Rebuilt and expanded ABIs for ENSJobPages and AGIJobManager, including tuple-returning jobLabelSnapshot, jobEnsLabel, jobEnsName, jobEnsURI, jobEnsNode, and the requested admin/read/write methods so the UI can perform accurate live reads and expose admin controls.
  • Reworked the ENS Job Page Preview card and preview logic to populate all required rows from live contract reads (owner, registry, nameWrapper, resolver, jobs root name/node, linked jobManager, jobLabelPrefix, jobLabelSnapshot, jobEnsLabel, jobEnsName, jobEnsURI, jobEnsNode), show resolvedEnsJobPagesSource, and label useEnsJobTokenURI vs AGIJobManager tokenURI mode (explicitly marked "owner-configurable, getter unavailable").
  • Removed local job- canonical assumptions: ensLabelPreviewForJobId() now uses the live jobLabelPrefix cache or returns unavailable when prefix was unreadable, and all code prefers on-chain jobEnsLabel(jobId) / jobLabelSnapshot(jobId) when connected.
  • Eliminated synthetic active job-ID fallback when event indexing fails; the UI now reports a degraded indexing state and returns an empty active list (or cached IDs with clear labeling) rather than fabricating IDs.
  • Replaced native prompt()-style admin arg collection with an in-page admin transaction builder modal plus structured review flow (adminActionModalactionReviewModal) that shows contract target, authorization posture, risk copy, and typed args before submission.
  • Strengthened runtime reset and context invalidation on wallet disconnect / chain switch / account change so ENS/admin preview fields and resolved instances are cleared to avoid stale displays.
  • Kept single-file architecture and updated visible version/copy to v26 while improving mobile UX by adding a mobile dock/sheet and ensuring no horizontal overflow in preview/admin cards.

Testing

  • Performed static validation scripts to confirm removals/additions: grep/regex checks confirmed the old ENS address 0xc19A84D10ed28c2642EfDA532eC7f3dD88E5ed94 is absent, fallback 0x06188e77...1da0 is present, resolveEnsJobPagesContract and ensSnapshotStatus are present, and no prompt() / alert() / confirm() calls remain; all checks succeeded.
  • Ran ABI and method-presence scans with small Python scripts to verify required ENSJobPages and AGIJobManager method names (including tuple-style jobLabelSnapshot) are present in the file; checks passed.
  • Started a local HTTP server and captured a headless browser screenshot of the new v26 artifact to validate render and mobile enhancements; the rendering/screenshot was produced successfully.
  • Performed runtime behavioral edits and smoke validations by invoking the in-page resolution flow in the code (calls to resolveEnsJobPagesContract() integrated into connect/refresh paths) and exercised admin modal open/continue flows in code paths; automated checks completed without leaving native dialogs and verified new modals exist.

All automated checks listed above passed on the updated standalone artifact ui/agijobmanager_genesis_job_mainnet_2026-03-05-v26.html.


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: 01303b46a5

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

Comment on lines +2363 to +2365
{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"rescueToken","outputs":[],"stateMutability":"nonpayable","type":"function"}

{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"additionalValidators","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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.

P0 Badge Insert comma between ABI entries

In the ensureAbiMethods(AGIJobManagerABI, [...]) array, the rescueToken object is followed directly by additionalValidators without a separating comma, which makes the inline script invalid JavaScript (Unexpected token '{' at parse time). Since this is in the main top-level script block, browsers stop executing the script entirely, so core functionality (wallet connect, data refresh, and transaction actions) does not run for any user opening the v26 page.

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