feat(ui): promote real applicant commit CTA into Participate applicant rail - #222
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d522f1aaf0
ℹ️ 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".
| if($('applicantCommitApplicationButtonSticky')) $('applicantCommitApplicationButtonSticky').disabled = true; | ||
| return; | ||
| } | ||
| if(!pid || !agiJobDiscovery?.methods) return; |
There was a problem hiding this comment.
Reset applicant readiness when procurement context is missing
In refreshParticipate, returning early on missing pid or contract methods leaves applicantCommitReadiness and button state untouched from the previous load, so a previously ready applicant can clear/switch procurement and still open openApplicantCommitReview() with stale readiness. In that state the UI can attempt commitApplication with empty or outdated inputs, causing wrong-procurement submissions/reverts and wasted gas; this path was previously guarded by resetting blockers and disabling commit controls before returning.
Useful? React with 👍 / 👎.
Motivation
commitApplication(...)write in the Participate experience.Description
applicantCommitApplicationButton(label: "Commit application on-chain"),applicantApproveStakeButtonandapplicantRevealApplicationButton, and an immediately visible blockers listapplicantCommitBlockersabove the fold inui/agijobmanager_genesis_job_mainnet_2026-04-03.html.agiJobDiscovery.methods.commitApplication(pid, commitment, subdomain, proof).send({from:userAccount})via helpersopenApplicantCommitReview()andsubmitApplicantCommit(); on success the packet is persisted locally and UI state updated to "On-chain committed".buildApplicantCommitBlockers(state)enforces contract-fidelity checks (paused, procurement exists/not cancelled, pause-adjusted time windows, normalized subdomain & authorization, reputation threshold, not already committed, applicant cap, commitment validity, balance/allowance when stake > 0); addedrefreshApplicantAllowanceState()and an approve action wired to Discovery as spender.Advanced local packet archive (secondary)with explicit local-only copy and message; commitment helpers remain in the primary applicant panel (solidity-packed hashing usingweb3.utils.soliditySha3).Testing
npm run check:no-binarieswhich passed with no forbidden binary additions.npm run docs:checkwhich passed documentation checks.npm run ui:abi:checkinitially failed due to missing build artifacts, then executednpx truffle compileto produce artifacts and re-rannpm run ui:abi:checkwhich passed.Codex Task