Skip to content

Add 2026-04-02 standalone Premium Participate-first mainnet UI#216

Open
MontrealAI wants to merge 3 commits into
mainfrom
codex/create-premium-discovery-participation-ui
Open

Add 2026-04-02 standalone Premium Participate-first mainnet UI#216
MontrealAI wants to merge 3 commits into
mainfrom
codex/create-premium-discovery-participation-ui

Conversation

@MontrealAI

Copy link
Copy Markdown
Owner

Motivation

  • Promote participation flows (commit/reveal/accept/trial/score/claim) from a secondary notebook into a first-class, review-first Participate studio so applicant commitments are the primary, idiot-proof gold path.
  • Preserve the single-file mainnet snapshot model and the canonical first-live-mainnet fixture while eliminating ambiguity between local packets and on-chain state.
  • Make participation flows phase-aware, pause-adjusted, proof-friendly (ENS-first with optional Merkle), allowance-aware, and mobile-first with sticky review CTAs.
  • Demote the prior notebook into an explicitly optional, local-only archive to avoid anchoring the user mentally in local-only work.

Description

  • Added a new standalone file ui/agijobmanager_genesis_job_mainnet_2026-04-02.html created from the 2026-04-01 snapshot and left the prior file untouched, implementing the Participate-first UX surface and rails (Applicant / Finalist / Validator / Claimant).
  • Introduced Participate studio UI and wiring: tab Participate, role tabs, applicant gold-path card, finalist and validator rails, claimant/balances rail, preflight review modals, review-first transaction flow copy, and success handoff cards with parsed tx/handoff info.
  • Implemented client helpers and UX plumbing: normalizeSubdomainLabel(...) for ENS normalization, randomSalt() using crypto.getRandomValues, local packet load/save/download/import helpers, computeEffectiveNow(proc, discoveryMeta) for pause-adjusted countdowns, and updateParticipateStudio(...) to render phase/minReputation/allowance posture.
  • Migrated action bindings from the old Claims surface into Participate with enhanced review-first tx builders for commitApplication, revealApplication, acceptFinalist, submitTrial, commitFinalistScore, and revealFinalistScore, and persisted local packet state on success (commit/reveal/score events) for reveal handoff and downloads.
  • Demoted the prior lower notebook into a collapsible Advanced local packet archive (secondary) with explicit local-only language, preserved local salt/commitment vault actions, and improved packet schema and metadata (schemaVersion, timestamps, normalized subdomain, proof-route summary, deadlines).
  • Kept canonical production fixture and ENS non-fatal hook semantics intact (first-live-mainnet constants and messaging preserved), and added UI copy/rules (review-first, phase-aware guidance, allowance cockpit and minReputation live semantics).

Testing

  • Ran npm run check:no-binaries — passed (no forbidden binaries detected).
  • Ran npm run docs:check — passed (documentation checks passed).
  • Ran npm run test:ui — passed (UI smoke tests passed; Playwright & local test harness executed successfully in this environment).
  • Ran npm run ui:abi:check — passed (UI ABI check passed).

All automated checks executed in-repo completed successfully against the modified single-file artifact.


Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 335687328b

ℹ️ 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".


<div class="premiumStepCard" data-participate-panel="claimant" style="display:none">
<div class="premiumStepHeader"><div><h3>Claimant / balances rail</h3><p class="premiumStepLead">Claimable balance with source hints: returned applicant stake, finalist stipend + stake return, validator bond + reward, employer unused reserve refunds.</p></div></div>
<div class="builderActions"><button class="btn" type="button" id="premiumClaimsRefreshBtn">Refresh claimable + discovery stats</button><button class="btn btn-primary" type="button" id="premiumDiscoveryClaimBtn">Review claim()</button></div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Deduplicate claim action IDs across Participate and Claims

The new Participate claimant card introduces id="premiumClaimsRefreshBtn" and id="premiumDiscoveryClaimBtn", which already exist in the Claims panel. Because handlers are attached via getElementById ($('premiumClaimsRefreshBtn') and $('premiumDiscoveryClaimBtn')), only the first DOM match is wired, so one panel’s claim controls will appear clickable but do nothing. This is a functional regression for whichever tab gets the non-bound duplicate IDs.

Useful? React with 👍 / 👎.

<div class="premiumStepCard" data-participate-panel="validator" style="display:none">
<div class="premiumStepHeader"><div><h3>Validator rail · commit score then reveal score</h3><p class="premiumStepLead">Choose finalist, keep score hidden during commit, then reveal with salt in reveal window. Employer and applicant conflict checks are explicit.</p></div></div>
<div class="premiumInputGrid">
<div class="premiumField"><label for="premiumActionFinalistSelect">Finalist selector (from live list)</label><select id="premiumActionFinalistSelect"></select></div>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Populate validator finalist selector before score actions

The validator rail now exposes an empty <select id="premiumActionFinalistSelect">, but no code populates it from loaded finalists. actionInputs() prefers this select value for score commit/reveal, and those actions require a finalist, so validator scoring fails from the intended UI path unless users discover and fill a different hidden field from another role panel. Populate this selector in procurement load/update logic (or keep a visible validator finalist input) so score actions are usable.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f9fc2e09df

ℹ️ 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".

<div class="alphaTokenMeta">
<div class="smallNote">TokenURI name</div>
<div style="font-weight:700" id="alphaIdentityTokenMetaName">Not applicable before issuance</div>
<div class="smallNote" id="alphaIdentityTokenMe

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Read attach preview from lexical discovery contract

refreshAttachPreview() gates all attach-side calculations behind window.agiJobDiscovery, but this file declares agiJobDiscovery with top-level let, so it is not guaranteed to exist on window. In that case the function returns immediately every time, leaving discovery budget, validation, and allowance indicators in the attach panel permanently stale even after wallet/contract initialization.

Useful? React with 👍 / 👎.

<div class="alphaTokenMeta">
<div class="smallNote">TokenURI name</div>
<div style="font-weight:700" id="alphaIdentityTokenMetaName">Not applicable before issuance</div>
<div class="smallNote" id="alphaIdentityTokenMe

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Prefer explicit finalist input when building action payload

actionInputs() always prefers premiumActionFinalistSelect over premiumActionFinalist, so any stale selected option can silently override a newly prefilled/imported finalist address. This causes validator commit/reveal actions to target the wrong finalist when quick-actions or packet import update only the text field, leading to incorrect transactions or avoidable reverts.

Useful? React with 👍 / 👎.

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