Skip to content

feat(ui): promote premium participation to dedicated Participate rail - #219

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

feat(ui): promote premium participation to dedicated Participate rail#219
MontrealAI wants to merge 2 commits into
mainfrom
codex/create-premium-discovery-ui-for-participation

Conversation

@MontrealAI

Copy link
Copy Markdown
Owner

Motivation

  • Promote participant actions out of the legacy Claims surface into a first-class, review-first premium studio so commitApplication(...) becomes the obvious gold path for applicants.
  • Fix the wrong mental model where participant actions were an expert notebook and surface commitment/reveal as a safe, local-first, premium experience.
  • Provide clear role rails (Applicant / Finalist / Validator / Claimant) with phase-aware readiness, allowance posture, and a demoted advanced local vault for archival packet tasks.

Description

  • Added a new top-level Participate tab and panel (premiumTabParticipate / premiumParticipatePanel) and slimmed the Claims panel to be balance/stat-centric only; moved participant action UI into the new Participate studio (file: ui/agijobmanager_genesis_job_mainnet_2026-04-02.html).
  • Implemented four role rails with progressive disclosure and the Applicant gold-path: procurement loader, pause-adjusted phase banner, wallet posture, ENS-first subdomain normalizer, proof editor behind advanced disclosure, application URI input, local salt generation (via crypto.getRandomValues), and local commitment computation using the exact formula keccak256(abi.encodePacked(procurementId, applicant, applicationURI, salt)).
  • Built a premium local packet workflow: save to localStorage, download/import JSON, packet schema/version fields, and explicit packet state transitions (Local packet only → On-chain committed → On-chain revealed) with event-driven updates after ApplicationCommitted / ApplicationRevealed parsing; added save/download/import handlers and helper savePacket() used after successful commit.
  • Added UX plumbing: subdomain normalization helper, inspector deep-links that prefill Participate context, reviewer-enhanced review modals for commitApplication / revealApplication (explicit privacy lines and stake notes), refined preflight and pause-adjusted timing reconstruction, finalist/validator affordances (live finalist list, score commit formula), CSS rules for role chips and mobile sticky CTA, and continuity field expansion so Participate fields persist across sessions.

Testing

  • Ran npm run check:no-binaries and received success: "No forbidden binary additions detected.".
  • Ran npm run docs:check and received success: documentation checks passed.
  • Ran npm run test:ui smoke tests where initial UI indexer helpers passed (smoke subtests OK); the command then proceeded into a longer environment/toolchain setup (browser & compile downloads) during which initial smoke tests passed; longer integration compile steps began but were not fully completed in this run due to environment runtime limits.

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: 1b0efaa59e

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

@@ -10817,7 +10733,7 @@ <h3>Operational readiness</h3>
};
}
async function refreshAttachPreview(){
if(!agiJobDiscovery?.methods) return;
if(!window.agiJobDiscovery?.methods) return;

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 Use module-scoped discovery handle in attach preview guard

refreshAttachPreview() now gates on window.agiJobDiscovery, but this file declares the contract instance as let agiJobDiscovery in script scope (top-level let is not a window property). In normal execution this condition stays truthy and the function returns early, so attach budget, validation, and allowance UI never refresh when users edit attach inputs.

Useful? React with 👍 / 👎.

Comment on lines +10412 to +10413
const minRevealCount = BigInt(Math.max(1, minReveal));
const maxRevealCount = BigInt(Math.max(Number(minRevealCount), maxReveal));

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 Reintroduce reveal-count locals before score-band math

This block references minReveal and maxReveal, but those locals were removed in this commit and are no longer defined in scope. Rendering the score-band explanation now throws a ReferenceError, which aborts the premium discovery refresh flow and prevents subsequent coach/wizard updates from running.

Useful? React with 👍 / 👎.

<div class="statusline" style="margin-top:12px"><b>Participant result</b>: <span id="premiumActionResult">No participant action submitted yet.</span></div>
</div>
<div class="premiumStepCard"><div class="premiumStepHeader"><div><h3>Claims quick links</h3><p class="premiumStepLead">Participation actions have moved to the dedicated Participate tab for applicant/finalist/validator/claimant role rails.</p></div></div><div class="premiumRoleActionRow" style="margin-top:12px"><button class="btn" type="button" id="premiumClaimsGoParticipateApplicant">Open Participate · Applicant</button><button class="btn" type="button" id="premiumClaimsGoParticipateValidator">Open Participate · Validator</button><button class="btn" type="button" id="premiumClaimsGoParticipateClaimant">Open Participate · Claimant</button></div></div>
</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 Remove extra container close in Claims panel

The standalone </div> inserted here closes a wrapper one level too early in the Claims section, so the sticky rail no longer remains inside the .premiumClaimsGrid structure. This mis-nesting changes the layout hierarchy and can cause the right rail to drop out of its intended grid placement.

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