Upgrade UI to v25: mobile dock rename, admin control surfaces, ABI & runtime refactor, bond/approval flow improvements#1453
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3511f0a75a
ℹ️ 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 loadTxActivity(){ | ||
| try{ txActivity = JSON.parse(localStorage.getItem(TX_ACTIVITY_KEY) || localStorage.getItem("agijobmanager_v17_tx_activity") || "[]"); }catch{ txActivity = []; } | ||
| try{ txActivity = JSON.parse(localStorage.getItem(TX_ACTIVITY_KEY) || "[]"); }catch{ txActivity = []; } |
There was a problem hiding this comment.
Keep loading tx activity from legacy v25 storage key
This change drops the fallback that previously read agijobmanager_v25_tx_activity, so users who already generated activity in the prior UI version will see an empty activity log after upgrading unless they also happen to have a v17 key. Because older builds wrote to the v25 key, this is a real migration regression; keep reading the old key (or migrate it once) before defaulting to [].
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 101ebc8fbe
ℹ️ 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.
Align dispute-role gating with contract modifiers
The new admin authorization logic treats both resolveDisputeWithCode and resolveStaleDispute as moderator-capable while also allowing owners to invoke any manager method, but on-chain access control differs (resolveDisputeWithCode is onlyModerator and resolveStaleDispute is onlyOwner in contracts/AGIJobManager.sol). In environments where owner and moderator are not the same address, the UI will present these actions as authorized and then submit transactions that deterministically revert, wasting gas and breaking the admin dispute workflow.
Useful? React with 👍 / 👎.
| const primary = localStorage.getItem(TX_ACTIVITY_KEY); | ||
| if(primary){ | ||
| txActivity = JSON.parse(primary || '[]'); | ||
| }else{ |
There was a problem hiding this comment.
Prefer latest tx activity key during local migration
loadTxActivity now unconditionally prefers agijobmanager_v17_tx_activity when it exists, and only reads the v25 key when v17 is missing. Users upgrading from the previous v25 build can easily have both keys (older v17 history plus newer v25 entries), and this path will silently load stale v17 data and hide recent v25 activity after upgrade.
Useful? React with 👍 / 👎.
Motivation
v25variant and modernize UX copy for bond math and approvals.Description
v23tov25and updated the mobile dock/sheet code and labels (#v25MobileDock,#v25MobileSheet,v25*functions and timers).#adminControlSection) and implemented helper functions for rendering posture badges, control buttons, and anexecuteAdminControlhandler that validates owner/moderator posture and routes calls toAGIJobManagerorENSJobPages.appStatewith a structuredAPP_STATEobject and addedresetRuntimeStateplusjobsReadDegradedflags; updated job index read logic to mark degraded fallbacks and display warnings.ensureAbiMethodsand added many admin/management method definitions forAGIJobManagerABIandENSJobPagesABI.requestActionConfirmation/pendingActionConfirmResolverpattern and replaced previousrequestSimpleReviewusages; updated token approval flows to use the new confirmation UI.getProtocolBigIntandgetProtocolNumber, renamed and adjusted agent bond computation tocomputeAgentBondExactForJob(uses protocol state values for bps/min/max/duration limit), and updated calculator/approval paths to use the new functions.ensLabelPreviewForJobIdand switched various UI areas to show predictable ENS label previews instead of implicitjob-Nstrings.createdViaversion tov25.0, changed several helper copy lines, adjustedTX_ACTIVITY_KEYname, simplifiedloadTxActivityfallback, and improved wallet/connection error messages.Testing
Codex Task