Add 2026-04-01 standalone mainnet UI with first-live-mainnet fixture and presets - #212
Add 2026-04-01 standalone mainnet UI with first-live-mainnet fixture and presets#212MontrealAI wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5cdbebacd
ℹ️ 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="meterRow"><span class="tiny">Mainnet</span><div class="barTrack"><div class="barFill" id="meterMainnet" style="width:0%"></div></div><span class="tiny" id="meterMainnetText">0%</span></div> | ||
| <div class="meterRow"><span class="tiny">Terms accepted</span><div class="barTrack"><div class="barFill" id="meterTerms" style="width:0 |
There was a problem hiding this comment.
Clear raw deadline mode when applying non-fixture presets
When premiumUsePreset('first-live-mainnet') runs, it forces premiumState.rawMode = true and injects fixed fixture timestamps, but there is no reset path when users switch to constitutional-flagship, blank-custom, or assurance. Because premiumSchedule() prioritizes raw mode, those later preset selections continue using the old absolute deadlines instead of the selected preset’s relative schedule, and once the fixture window is in the past the validation gate (commitDeadline must be in the future) blocks submission entirely.
Useful? React with 👍 / 👎.
| <div class="meter"> | ||
| <div class="meterRow"><span class="tiny">Connected</span><div class="barTrack"><div class="barFill" id="meterConnected" style="width:0%"></div></div><span class="tiny" id="meterConnectedText">0%</span></div> | ||
| <div class="meterRow"><span class="tiny">Mainnet</span><div class="barTrack"><div class="barFill" id="meterMainnet" style="width:0%"></div></div><span class="tiny" id="meterMainnetText">0%</span></div> | ||
| <div class="meterRow"><span class="tiny">Terms accepted</span><div class="barTrack"><div class="barFill" id="meterTerms" style="width:0 |
There was a problem hiding this comment.
Keep exemplar loader from overwriting exemplar fields
premiumLoadExemplar() first fills exemplar-specific URI/details/payout/duration values, then immediately calls premiumUsePreset('first-live-mainnet', true), which overwrites those inputs with the live fixture constants in the first-live-mainnet branch. This makes the “Load flagship example into builder” flow unable to preserve the exemplar values it just applied, so operators get fixture content instead of the requested exemplar template.
Useful? React with 👍 / 👎.
| <div class="meter"> | ||
| <div class="meterRow"><span class="tiny">Connected</span><div class="barTrack"><div class="barFill" id="meterConnected" style="width:0%"></div></div><span class="tiny" id="meterConnectedText">0%</span></div> | ||
| <div class="meterRow"><span class="tiny">Mainnet</span><div class="barTrack"><div class="barFill" id="meterMainnet" style="width:0%"></div></div><span class="tiny" id="meterMainnetText">0%</span></div> | ||
| <div class="meterRow"><span class="tiny">Terms accepted</span><div class="barTrack"><div class="barFill" id="meterTerms" style="width:0 |
There was a problem hiding this comment.
Point Fast command action to an existing preset
The command palette action premium-fast still invokes premiumUsePreset('fast', true) even though the fast preset was removed from PREMIUM_PRESETS. The fallback logic silently loads first-live-mainnet, so users selecting “Apply Fast / Lean preset” actually get the default production template and economics instead of a lean profile, which is misleading and can alter expected budget/risk settings.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 451e7fde25
ℹ️ 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="meter"> | ||
| <div class="meterRow"><span class="tiny">Connected</span><div class="barTrack"><div class="barFill" id="meterConnected" style="width:0%"></div></div><span class="tiny" id="meterConnectedText">0%</span></div> | ||
| <div class="meterRow"><span class="tiny">Mainnet</span><div class="barTrack"><div class="barFill" id="meterMainnet" style="width:0%"></div></div><span class="tiny" id="meterMainnetText">0%</span></div> | ||
| <div class="meterRow"><span class="tiny">Terms accepted</span><div class="barTrack"><div class="barFill" id="meterTerms" style="width:0 |
There was a problem hiding this comment.
Wire fixture inspector button to existing inspector APIs
Clicking Open in inspector executes premiumSetSurface('inspect') and premiumLoadInspector(), but neither symbol is defined in this file, and the handler writes to premiumInspectorId (which is also absent; the inspector field is premiumInspectorProcurementId). In the browser this raises a ReferenceError on click, so the new first-live fixture shortcut cannot open/load procurement 0 as advertised.
Useful? React with 👍 / 👎.
| </div> | ||
| <div class="meter"> | ||
| <div class="meterRow"><span class="tiny">Connected</span><div class="barTrack"><div class="barFill" id="meterConnected" style="width:0%"></div></div><span class="tiny" id="meterConnectedText">0%</span></div> | ||
| <div class="meterRow"><span class="tiny">Mainnet</span><div class="barTrack"><div class="barFill" id="meterMainnet" style="width:0%"></div></div><span class="tiny" id="meterMainnetText">0%</span></div> | ||
| <div class="meterRow"><span class="tiny">Terms accepted</span><div class="barTrack"><div class="barFill" id="meterTerms" style="width:0 |
There was a problem hiding this comment.
Guard mission actions against missing local-scope helpers
The command-palette mission actions call if(setPanel), loadProcurement(), and reviewClaim() directly from this IIFE, but these identifiers are not in scope here (the implementations are declared inside a different IIFE). Triggering premium-open-*, premium-load-procurement, or premium-claim-discovery therefore throws at runtime instead of navigating/loading, breaking those palette shortcuts.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b07c497a5
ℹ️ 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="meterRow"><span class="tiny">Mainnet</span><div class="barTrack"><div class="barFill" id="meterMainnet" style="width:0%"></div></div><span class="tiny" id="meterMainnetText">0%</span></div> | ||
| <div class="meterRow"><span class="tiny">Terms accepted</span><div class="barTrack"><div class="barFill" id="meterTerms" style="width:0 |
There was a problem hiding this comment.
Stop defaulting to expired raw fixture deadlines
The default first-live-mainnet preset copies fixed UNIX deadlines from the fixture into the form, so the commit window is hardcoded to April 3, 2026 UTC (1775258936) rather than being computed from current time. Once that date passes, the built-in validation (commitDeadline must be in the future) blocks submission for the default/recommended flow until operators manually edit deadlines or disable raw mode, which makes the primary launch path time-bombed.
Useful? React with 👍 / 👎.
| <div class="meterRow"><span class="tiny">Mainnet</span><div class="barTrack"><div class="barFill" id="meterMainnet" style="width:0%"></div></div><span class="tiny" id="meterMainnetText">0%</span></div> | ||
| <div class="meterRow"><span class="tiny">Terms accepted</span><div class="barTrack"><div class="barFill" id="meterTerms" style="width:0 |
There was a problem hiding this comment.
Bind palette actions to reachable inspector helpers
Even with the new typeof guards, these palette actions are still effectively inert: setPanel, loadProcurement, and reviewClaim are declared inside a separate IIFE later in the file and are never exported to window, so these checks evaluate false in this scope. In practice, premium-load-procurement and premium-claim-discovery silently do nothing instead of opening/loading/claiming as advertised.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1de03042bc
ℹ️ 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> | ||
| <div class="meter"> | ||
| <div class="meterRow"><span class="tiny">Connected</span><div class="barTrack"><div class="barFill" id="meterConnected" style="width:0%"></div></div><span class="tiny" id="meterConnectedText">0%</span></div> | ||
| <div class="meterRow"><span class="tiny">Mainnet</span><div class="barTrack"><div class="barFill" id="meterMainnet" style="width:0%"></div></div><span class="tiny" id="meterMainnetText">0%</span></div> | ||
| <div class="meterRow"><span class="tiny">Terms accepted</span><div class="barTrack"><div class="barFill" id="meterTerms" style="width:0 |
There was a problem hiding this comment.
Open inspector tab before loading fixture procurement
Fresh evidence in this revision: the fixture button now guards setPanel/loadProcurement, but when those helpers are out of scope in this IIFE it only scrolls to premiumInspectorPanel and never activates the inspector tab. In the default create view, that panel is hidden, so clicking Open in inspector appears to do nothing instead of loading procurement 0 as advertised.
Useful? React with 👍 / 👎.
| <div class="meterRow"><span class="tiny">Connected</span><div class="barTrack"><div class="barFill" id="meterConnected" style="width:0%"></div></div><span class="tiny" id="meterConnectedText">0%</span></div> | ||
| <div class="meterRow"><span class="tiny">Mainnet</span><div class="barTrack"><div class="barFill" id="meterMainnet" style="width:0%"></div></div><span class="tiny" id="meterMainnetText">0%</span></div> | ||
| <div class="meterRow"><span class="tiny">Terms accepted</span><div class="barTrack"><div class="barFill" id="meterTerms" style="width:0 |
There was a problem hiding this comment.
Sync visible duration chip with first-live preset
Applying the default first-live-mainnet preset forces premiumDiscoveryDurationDays to 7, but there is no corresponding chip-state update, so the UI can still show the pre-marked 45 days chip as active. That mismatch makes operators believe they are launching a 45-day configuration while the submitted struct actually uses 7 days until they manually notice/edit the numeric field.
Useful? React with 👍 / 👎.
Motivation
createPremiumJobWithDiscovery(...)transaction the canonical, production-ready template while keeping the previous v45 snapshot as historical reference.Description
ui/agijobmanager_genesis_job_mainnet_2026-04-01.htmlcloned from v45 and extended with a top-of-section “First live mainnet premium creation” fixture strip, one-click actions (load template, copy tuple JSON, copy human summary, open inspector, use as draft), and visible ENS skipped-note.first-live-mainnetpreset (made default) plusconstitutional-flagship,blank-customand retainedassurance, and wiredpremiumUsePresetsofirst-live-mainnetpopulates exact fixture constants (job tuple, procurement tuple, payout=100000, procurement budget=7020, total exposure=107020, duration=604800s, 3/5/7 structure, 35/65 weighting, economics 300/1250/1500/120/350) while preserving the connected wallet as the signing identity.FIRST_LIVE_MAINNET_FIXTUREand simple runtime parity checks (budget and tuple invariants) plus client-side helpers to copy the fixture JSON/summary and to open the procurement inspector with the fixture IDs.minReputation = 0inheritance semantics via live ManagerPrime reads, and kept attach flow explicitly secondary.2026-04-01artifact while keepingv45in the repo as historical snapshot (ui/README.md,docs/ui/*variants anddocs/ui/VERSIONS.mdadjusted).Testing
npm run check:no-binarieswhich passed with no forbidden binary additions.npm run lint(solhint) which completed and reported existing code warnings only; no new lint errors introduced by this change.npm run docs:checkwhich passed (documentation checks succeeded).npm run testwhich stalled during Truffle/solc download in this environment (fetch of compiler fromsolc-bindid not complete); process was terminated after extended wait.typecheck,test:e2e,test:a11y,test:security,docs:versions,docs:contract,build:ipfs,verify:ipfs,verify:deterministic,verify:committed-html) and were therefore not executed here.Files changed (high level):
ui/agijobmanager_genesis_job_mainnet_2026-04-01.html(new standalone artifact with fixture, presets, runtime parity checks, UI wiring).ui/README.md,docs/ui/README.md,docs/ui/GENESIS_JOB_MAINNET_HTML_UI.md,docs/ui/STANDALONE_HTML_UIS.md,docs/ui/VERSIONS.md,docs/ui/DEPLOYMENT_MAINNET.md,docs/ui/IDENTITY_LAYER.md,docs/ui/CONTRACT_INTERFACE.mdto point canonical references at2026-04-01while preserving historical mentions ofv45.If you want, I can (1) produce a minimal smoke checklist to exercise the new fixture buttons locally, (2) add a small automated Node-based parity unit test that validates
FIRST_LIVE_MAINNET_FIXTUREinvariants outside the browser, or (3) revert docs-only changes if you prefer to keep the canonical pointer until final review.Codex Task