Skip to content

Add AGIJobManager Prime · Mainnet Console (genesis) UI#217

Open
MontrealAI wants to merge 7 commits into
mainfrom
codex/create-premium-discovery-participation-ui-nohpza
Open

Add AGIJobManager Prime · Mainnet Console (genesis) UI#217
MontrealAI wants to merge 7 commits into
mainfrom
codex/create-premium-discovery-participation-ui-nohpza

Conversation

@MontrealAI

Copy link
Copy Markdown
Owner

Motivation

  • Provide a single-file, review-first console for Prime mainnet operations that surfaces settlement, discovery, identity, bridge, and admin workflows for AGIJobManagerPrime/AGIJobDiscoveryPrime.
  • Ship an integrated flagship "Premium Discovery" workbench to author and atomically create discovery+settlement jobs (illustrative flagship exemplar included).
  • Enable operator-ready flows (wallet connect, preflight, ENS identity, deBridge conversion, sticky mobile dock, and modal transaction review) in a compact, portable HTML page.

Description

  • Adds a new UI file ui/agijobmanager_genesis_job_mainnet_2026-04-02.html that contains the full console markup, styles, and client-side logic for Prime mainnet operations including wallet/connect, terms gate, preflight, job builder, premium discovery workbench, inspector, participate studio, claims, bridge/vault flows, Alpha-Agent identity minting, and admin panels.
  • Implements rich client-side features and contract integrations: embedded ABIs for AGIJobManager, AGIJobDiscoveryPrime, AGIJobCompletionNFT, ENS/registrar ABIs, an on-page deBridge embed, IPFS pinning/upload support, local draft & packet storage, and transaction review/approval orchestration with allowance handling and tracked local activity.
  • Implements premium-specific tooling: presets, budget quoting (quoteProcurementBudget), procurement attach/create flows (createPremiumJobWithDiscovery, attachProcurementToExistingJob), timeline builders, numeric simulators, and settlement math mirrors (agent/validator/dispute bond calculations and helper calculators).
  • Adds error handling helpers for decoding custom revert selectors, identity preflight helpers, mobile enhancements (v26 dock/sheet), and accessibility/modal focus traps; packages everything as a self-contained single HTML for deployment or hosting.

Testing

  • No automated tests were executed for this change.
  • The addition is a new UI asset only; any automated coverage should be added in follow-up PRs (unit/browser tests and integration tests against a testnet or mocked provider are recommended).

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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

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

<div class="alphaTokenMeta">
<div class="smallNote">TokenURI name</div>
<div style="font-weight:700" id="alphaIdentityTokenMetaName">Not applicable before issuance</div>
<div class="smallNote" id="alphaIdentityTokenMe

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 Guard participate refresh against stale procurement loads

loadProcurement correctly uses premiumProcurementLoadRequestId to ignore stale inspector responses, but it then fires updateParticipateStudio(proc) without any request-id guard. That helper performs additional async RPC reads and writes participate-phase/allowance UI fields, so loading procurement A and then B quickly can let A's slower follow-up overwrite B's participate panel state. Pass the current request id into updateParticipateStudio (or re-check it before each UI write) so only the latest load updates these fields.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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

ℹ️ 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 +10882 to +10885
<div class="alphaTokenMeta">
<div class="smallNote">TokenURI name</div>
<div style="font-weight:700" id="alphaIdentityTokenMetaName">Not applicable before issuance</div>
<div class="smallNote" id="alphaIdentityTokenMe

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 Use visible finalist selector before hidden text fallback

In actionInputs, finalist is derived as finalistText || finalistSelect, but the free-text field lives in the Finalist panel and is hidden while the Validator panel is active. If that hidden input contains a stale value (from prior role use, restored UI continuity, or packet import), score commit/reveal can target the wrong finalist address without the operator seeing it, causing incorrect writes or reverted transactions. Prefer the validator dropdown value when available (or clear hidden finalist text on role/procurement changes).

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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

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

<div class="alphaTokenMeta">
<div class="smallNote">TokenURI name</div>
<div style="font-weight:700" id="alphaIdentityTokenMetaName">Not applicable before issuance</div>
<div class="smallNote" id="alphaIdentityTokenMe

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 Use a defined parser for attach stake fields

attachStruct() calls premiumParseAmount(...) for every monetary field, but that function is never declared in this file. As soon as attachStruct() runs (e.g., refreshAttachPreview() on bind, reviewAttach(), or the attach approve path), a ReferenceError is thrown and the attach-procurement workflow cannot build the struct needed for budget preview or submission.

Useful? React with 👍 / 👎.

<div class="alphaTokenMeta">
<div class="smallNote">TokenURI name</div>
<div style="font-weight:700" id="alphaIdentityTokenMetaName">Not applicable before issuance</div>
<div class="smallNote" id="alphaIdentityTokenMe

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 Replace undefined formatter in premium refresh table

premiumRefresh() builds scenarioRows with formatNumber(amount), but no formatNumber function exists. Because premiumRefresh() is called during initialization and on form edits, this throws at runtime and aborts the refresh pipeline before downstream validation and submit-state updates can run, leaving the create panel in a broken/stale state.

Useful? React with 👍 / 👎.

Comment on lines +10408 to +10409
<div style="font-weight:700" id="alphaIdentityTokenMetaName">Not applicable before issuance</div>
<div class="smallNote" id="alphaIdentityTokenMe

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 Fix undefined reveal-count vars in score-band math

The score-band explanation block references minReveal/maxReveal, but those identifiers are not defined in this scope (the function uses minRevealsPerFinalist/maxRevealsPerFinalist earlier). Once execution reaches this block, premiumRefresh() throws a ReferenceError, so the remaining premium UI updates do not execute.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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

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

<div class="alphaTokenMeta">
<div class="smallNote">TokenURI name</div>
<div style="font-weight:700" id="alphaIdentityTokenMetaName">Not applicable before issuance</div>
<div class="smallNote" id="alphaIdentityTokenMe

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 Define timelineMonotonic before building wizard steps

premiumRefresh() uses timelineMonotonic when assembling wizardRail, but that identifier is never declared in this scope (or elsewhere in the file). Because premiumInit() calls premiumRefresh() during startup, this raises a ReferenceError on initial render and aborts the premium create refresh pipeline, leaving validation/status UI stale and blocking normal create-flow guidance.

Useful? React with 👍 / 👎.

<div class="alphaTokenMeta">
<div class="smallNote">TokenURI name</div>
<div style="font-weight:700" id="alphaIdentityTokenMetaName">Not applicable before issuance</div>
<div class="smallNote" id="alphaIdentityTokenMe

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 Replace undefined copyText helper in premium copy buttons

The first-live copy button handlers invoke copyText(...), but there is no copyText function defined in this page scope. When users click these controls (tuple/summary/applicant/validator copy), the handler throws and nothing is copied, so the quick-share workflow advertised by these buttons is broken at runtime.

Useful? React with 👍 / 👎.

<div class="alphaTokenMeta">
<div class="smallNote">TokenURI name</div>
<div style="font-weight:700" id="alphaIdentityTokenMetaName">Not applicable before issuance</div>
<div class="smallNote" id="alphaIdentityTokenMe

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 Avoid calling out-of-scope premiumApprove in attach flows

premiumApprove is declared inside the earlier premium-discovery IIFE and is not exported, but this attach module (a separate IIFE) calls it directly. In allowance-short scenarios, clicking attach approval/review paths reaches this call and throws ReferenceError: premiumApprove is not defined, so users cannot grant discovery allowance from the attach surface.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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

ℹ️ 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 +4055 to +4059
</div>
<div class="alphaTokenMeta">
<div class="smallNote">TokenURI name</div>
<div style="font-weight:700" id="alphaIdentityTokenMetaName">Not applicable before issuance</div>
<div class="smallNote" id="alphaIdentityTokenMe

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 Ship full AGIJobManager ABI for admin writes

The Operator Deck invokes manager admin actions via executeAdminControl() (contract.methods[method](...args)), but AGIJobManagerABI only includes read/job-path entries and omits the admin methods wired into managerRoutineControls/managerDangerControls (for example setSettlementPaused, addModerator, updateMerkleRoots). In this state, clicking those controls reaches an undefined contract method and fails at runtime instead of submitting a transaction.

Useful? React with 👍 / 👎.

Comment on lines +4122 to +4126
</div>
<div class="alphaTokenMeta">
<div class="smallNote">TokenURI name</div>
<div style="font-weight:700" id="alphaIdentityTokenMetaName">Not applicable before issuance</div>
<div class="smallNote" id="alphaIdentityTokenMe

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 Include ENSJobPages write methods in ABI

ENS admin controls are also non-functional because ENSJobPagesABI is read-only (jobsRoot/jobEns* views) while the UI exposes write calls such as setJobManager, setJobsRoot, createJobPage, and lockConfiguration through executeAdminControl(). Since those methods are absent from the ABI, Web3 does not generate callable method wrappers and every ENS admin action fails before broadcast.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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: 180759a960

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

<div class="alphaTokenMeta">
<div class="smallNote">TokenURI name</div>
<div style="font-weight:700" id="alphaIdentityTokenMetaName">Not applicable before issuance</div>
<div class="smallNote" id="alphaIdentityTokenMe

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 Pass only two root nodes in updateRootNodes admin form

The admin argument schema collects 4 parameters for updateRootNodes, but the loaded AGIJobManagerABI method takes 2 inputs (_agentRootNode, _validatorRootNode). When an operator submits this control, contract.methods.updateRootNodes(...args) receives 4 arguments and Web3 rejects the call with an invalid-arity error, so this admin action is currently unusable.

Useful? React with 👍 / 👎.

<div class="alphaTokenMeta">
<div class="smallNote">TokenURI name</div>
<div style="font-weight:700" id="alphaIdentityTokenMetaName">Not applicable before issuance</div>
<div class="smallNote" id="alphaIdentityTokenMe

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 Match resolveDisputeWithCode args to deployed ABI

resolveDisputeWithCode is configured with 3 prompted args in ADMIN_METHOD_SCHEMAS, but the active manager ABI in this file defines only 2 inputs for that function. As a result, submitting this admin control passes one extra argument and fails before transaction broadcast, blocking dispute resolution through this UI path.

Useful? React with 👍 / 👎.

<div class="alphaTokenMeta">
<div class="smallNote">TokenURI name</div>
<div style="font-weight:700" id="alphaIdentityTokenMetaName">Not applicable before issuance</div>
<div class="smallNote" id="alphaIdentityTokenMe

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 Guard optional discoveryState read before .call()

This read uses optional chaining for discoveryState but then unconditionally dereferences .call(). If discoveryState is absent from the generated contract methods (which is possible here because it is not in AGIJobDiscoveryPrimeABI), the expression throws a TypeError and updateParticipateStudio aborts, leaving participate-phase and allowance widgets stale after loading a procurement.

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