Skip to content

Add 2026-04-03 mainnet UI: primary Applicant 'Commit application on-chain' CTA wired to AGIJobDiscovery.commitApplication#221

Merged
MontrealAI merged 1 commit into
mainfrom
codex/create-mainnet-ui-for-applicant-commit-flow
Apr 2, 2026
Merged

Add 2026-04-03 mainnet UI: primary Applicant 'Commit application on-chain' CTA wired to AGIJobDiscovery.commitApplication#221
MontrealAI merged 1 commit into
mainfrom
codex/create-mainnet-ui-for-applicant-commit-flow

Conversation

@MontrealAI

Copy link
Copy Markdown
Owner

Motivation

  • Restore the flagship Participate → Applicant on-chain commit path that was previously hidden in the advanced/local archive and make the real commitApplication(...) write first-class and discoverable above-the-fold.
  • Provide a stable, review-first, contract-faithful applicant flow (normalize subdomain, compute salted commitment, allowance cockpit, review modal, and final write) so users can complete the full commit→reveal lifecycle without relying on the archive.
  • Demote the lower local packet archive to a clearly labeled secondary helper and keep it local-only to avoid confusing it with the primary on-chain surface.

Description

  • Added new standalone artifact ui/agijobmanager_genesis_job_mainnet_2026-04-03.html cloned and refactored from 2026-04-02 so the previous file is preserved and 2026-04-03 becomes canonical for mainnet.
  • Implemented a visible primary applicant CTA stack in Participate > Applicant including #applicantCommitApplicationButton (label: "Commit application on-chain"), #applicantCommitApplicationButtonSticky (mobile sticky), #applicantApproveStakeButton, and #applicantCommitBlockers placed above the fold and outside the advanced vault.
  • Wired the commit path to the real contract write using review-first flow: openApplicantCommitReview() → review modal → executes agiJobDiscovery.methods.commitApplication(pid, commitment, subdomain, proof).send({from:userAccount}), and on success the code saves the packet locally and updates packet state to On-chain committed.
  • Refactored applicant helpers and readiness logic: added normalizeAgentSubdomain(...), parseBytes32ArrayInput(...), and computeApplicationCommitment(...), tightened generateApplicationCommitment() to validate full bytes32 salt, and rewrote refreshParticipate() to compute pause-adjusted effectiveNow, read required contract getters (procurements, applications, procurementApplicants, MAX_APPLICANTS, paused, pauseStartedAt, pausedSecondsAccumulated, isAuthorizedAgent, allowance, balanceOf), build explicit blocker list, render blockers under #applicantCommitBlockers, and enable/disable the primary CTA accordingly.
  • Kept the existing review-first reviewDiscoveryWrite(...) infrastructure and reused it for applicant commit/reveal while adding openApplicantCommitReview and submitApplicantReveal wrappers; preserved premiumActionCommitApplicationBtn as an alias but made the primary pathway front-and-center.
  • Demoted advanced local tools: renamed the lower drawer to #advancedLocalPacketArchive and changed its copy to emphasize "local-only" and that it is a secondary archive; ensured primary commit/reveal buttons are not located only in this drawer.
  • Updated UI continuity fields and schema version to include the new button id and schemaVersion:'2026-04-03' so state persists correctly for the new artifact.

Testing

  • Ran npm run check:no-binaries and confirmed no forbidden binary additions (passed).
  • Ran npm run docs:check and confirmed documentation checks passed (passed).
  • Ran npm run test:ui; the UI unit/indexer helper subtests passed (smoke unit tests OK), however a full smoke run attempted to start Ganache and encountered an environment port conflict (EADDRINUSE 127.0.0.1:8545) during one run in this environment; subsequent targeted UI smoke checks (indexer helpers) passed.
  • Manual JS sanity validation performed by running the page JavaScript bind sequence in a dev environment (script boots and binds the primary applicant events), and the commit/reveal handlers are wired to the live agiJobDiscovery.methods.commitApplication(...) / revealApplication(...) call paths in the review-first runner.

Codex Task

@MontrealAI MontrealAI merged commit 86f0ea1 into main Apr 2, 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