Skip to content

Upgrade mobile shell to v25, add admin control surfaces, centralize runtime state and ABI enhancements#1454

Open
MontrealAI wants to merge 1 commit into
mainfrom
codex/upgrade-agijobmanager-ui-to-v25-7zrh9e
Open

Upgrade mobile shell to v25, add admin control surfaces, centralize runtime state and ABI enhancements#1454
MontrealAI wants to merge 1 commit into
mainfrom
codex/upgrade-agijobmanager-ui-to-v25-7zrh9e

Conversation

@MontrealAI
Copy link
Copy Markdown
Owner

Motivation

  • Modernize the mobile UI scaffold and versioning (v23 → v25) to support refined mobile dock/sheet behavior and labels.
  • Introduce richer on-page administrative control surfaces so owners/moderators can inspect and call high-risk methods from the UI.
  • Centralize and harden client runtime state handling to reduce inconsistent state and provide degraded-read fallback visibility.
  • Expand ABI coverage and make contract method handling more robust to support additional admin actions and safe reads.

Description

  • Renamed mobile CSS/JS identifiers and classes from v23v25 and rewired the mobile dock/sheet code paths and handlers to use v25* ids, labels, and helpers; updated the mobile enhancement script id accordingly.
  • Added an Admin Control Surfaces UI block and corresponding JS: postureBadge, adminControlButton, executeAdminControl, and a new refreshAdminPanels that renders routine and danger control buttons for AGIJobManager and ENSJobPages (with argument prompt and confirmation flow).
  • Centralized in-memory state with a new APP_STATE object and improved reset/migration logic via resetRuntimeState, added jobsReadDegraded flagging, localStorage migration for tx activity, and expanded loadTxActivity to handle legacy keys.
  • Reworked ABI utilities to ensureAbiMethods and added many admin/management ABI entries for both AGIJobManagerABI and ENSJobPagesABI; replaced multiple smaller helpers (e.g. renamed bond math helpers to computeAgentBondExactForJob, introduced getProtocolBigInt, ensLabelPreviewForJobId) and updated uses across the UI.
  • Improved user confirmation flow by replacing requestSimpleReview with requestActionConfirmation pattern using a pending resolver to serialize confirm/cancel actions and updated approval/transaction flows to present richer facts and checks to the user.
  • UX copy and metadata version bumpes: clarified Quick Bond Calculator text, updated generated metadata createdVia to v25.0, and made ENS label preview generation predictable when ENSJobPages lacks live labels.

Testing

  • No automated tests were executed for this changeset.

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: 5891120b8a

ℹ️ 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 +5618 to +5621
const moderatorMethods = new Set(['resolveDisputeWithCode','resolveStaleDispute']);
const authorized = target === 'ens'
? isEnsOwner
: (isManagerOwner || (isModerator && moderatorMethods.has(method)));
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 Enforce correct roles for dispute admin calls

executeAdminControl currently treats both dispute methods as owner-or-moderator actions (isManagerOwner || (isModerator && ...)), but the contract requires different roles: resolveDisputeWithCode is moderator-only and resolveStaleDispute is owner-only (contracts/AGIJobManager.sol). This mismatch means the UI will allow users to submit calls they are not permitted to execute, causing avoidable reverted transactions and gas loss (e.g., owners attempting resolveDisputeWithCode, or moderators attempting resolveStaleDispute).

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