Skip to content

feat(ui): strengthen applicant Participate rail with Approve + Commit CTA - #224

Merged
MontrealAI merged 1 commit into
mainfrom
codex/update-html-for-commitapplication-ux
Apr 3, 2026
Merged

feat(ui): strengthen applicant Participate rail with Approve + Commit CTA#224
MontrealAI merged 1 commit into
mainfrom
codex/update-html-for-commitapplication-ux

Conversation

@MontrealAI

Copy link
Copy Markdown
Owner

Motivation

  • Restore the flagship applicant flow so non-technical MetaMask users can approve stake and submit the real on-chain commitApplication(...) call directly from the main Participate surface.
  • Remove the blocking UX gap where the primary commit path was only present in secondary helpers or local archives and not a visible, review-first on-chain action in the premium applicant panel.

Description

  • Added an inline Approve stake + commit control (id="applicantApproveAndCommitButton") to the flagship applicant card (id="participateApplicantPanel") while keeping the dominant Commit application on-chain button visible and primary.
  • Implemented submitApproveAndCommit() to perform stake approval to the Discovery spender, refresh on-chain readiness, then open the existing review-first commitApplication(...) write path that calls agiJobDiscovery.methods.commitApplication(...).
  • Updated readiness/CTA logic so the new button is enabled only when the remaining blocker is an allowance shortfall, and blockers are always shown under the primary CTA (#applicantCommitBlockers) with explicit human-readable reasons.
  • Preserved local packet utilities and demoted the archive copy by clarifying the advanced section (id="advancedLocalPacketArchive") text to: this is optional local packet storage and not the primary on-chain action surface.

Testing

  • Verified presence of required IDs and labels via code search: participateApplicantPanel, applicantApproveStakeButton, applicantApproveAndCommitButton, applicantCommitApplicationButton, applicantRevealApplicationButton, and advancedLocalPacketArchive.
  • Confirmed live write paths and hooks still exist by locating commitApplication( and revealApplication( in the main file and the wallet integration hooks eth_requestAccounts, wallet_switchEthereumChain, accountsChanged, and chainChanged.
  • Ran smoke searches and static checks to ensure the new button is wired to submitApproveAndCommit() and that blocker/enabling logic is updated; these checks passed.
  • Saved the single-file HTML with the changes and validated that the primary commit flow remains review-first and calls the real Discovery contract method for commit and reveal.

Codex Task

@MontrealAI
MontrealAI merged commit ef0bbfa into main Apr 3, 2026
4 checks passed
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