Upgrade mobile shell to v25, add admin control surfaces, centralize runtime state and ABI enhancements#1454
Conversation
There was a problem hiding this comment.
💡 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".
| const moderatorMethods = new Set(['resolveDisputeWithCode','resolveStaleDispute']); | ||
| const authorized = target === 'ens' | ||
| ? isEnsOwner | ||
| : (isManagerOwner || (isModerator && moderatorMethods.has(method))); |
There was a problem hiding this comment.
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 👍 / 👎.
Motivation
Description
v23→v25and rewired the mobile dock/sheet code paths and handlers to usev25*ids, labels, and helpers; updated the mobile enhancement script id accordingly.Admin Control SurfacesUI block and corresponding JS:postureBadge,adminControlButton,executeAdminControl, and a newrefreshAdminPanelsthat renders routine and danger control buttons forAGIJobManagerandENSJobPages(with argument prompt and confirmation flow).APP_STATEobject and improved reset/migration logic viaresetRuntimeState, addedjobsReadDegradedflagging, localStorage migration for tx activity, and expandedloadTxActivityto handle legacy keys.ensureAbiMethodsand added many admin/management ABI entries for bothAGIJobManagerABIandENSJobPagesABI; replaced multiple smaller helpers (e.g. renamed bond math helpers tocomputeAgentBondExactForJob, introducedgetProtocolBigInt,ensLabelPreviewForJobId) and updated uses across the UI.requestSimpleReviewwithrequestActionConfirmationpattern using a pending resolver to serialize confirm/cancel actions and updated approval/transaction flows to present richer facts and checks to the user.createdViatov25.0, and made ENS label preview generation predictable when ENSJobPages lacks live labels.Testing
Codex Task