Skip to content

Fix v42 Alpha-Agent identity console: consistent preview snapshot, deterministic recommendations, direct register review - #182

Open
MontrealAI wants to merge 2 commits into
mainfrom
codex/fix-alpha-agent-console-in-v42-ui-n6id9y
Open

Fix v42 Alpha-Agent identity console: consistent preview snapshot, deterministic recommendations, direct register review#182
MontrealAI wants to merge 2 commits into
mainfrom
codex/fix-alpha-agent-console-in-v42-ui-n6id9y

Conversation

@MontrealAI

Copy link
Copy Markdown
Owner

Motivation

  • Repair the broken Alpha‑Agent Free Trial & Identity Console so preview(label) and rootHealth() produce a single coherent state snapshot and the UI never shows contradictory loading/ready/button states.
  • Ensure the UI uses the exact FreeTrialSubdomainRegistrarIdentity.register(string) path (0 ETH) with explicit transaction review facts and no legacy compatibility indirection.
  • Replace imprecise copy such as “Authoritative identity preview” and eliminate empty/dash placeholders by surfacing exact reasons when data is unavailable.

Description

  • Single-source identity snapshot: extend APP_STATE.identity with previewLabel, requestId, activeRequestId, async and errors buckets, recommendation, and parity metadata to make all panels derive from the same snapshot. (file: ui/agijobmanager_genesis_job_mainnet_2026-03-05-v42.html)
  • Request freshness and gating: add nextIdentityRequestToken() and isCurrentIdentityRequest() and guard all async read-handlers in refreshIdentityState() so stale RPC responses cannot overwrite newer label state. (file: ui/agijobmanager_genesis_job_mainnet_2026-03-05-v42.html)
  • Deterministic recommendation model: implement deriveIdentityRecommendation(preview, rootHealth, local) that maps preview.status 0..8 to exact recommended methods and exposes an explicit expert fallback when preview(label) fails but root posture/readiness is healthy. Write enablement derives from this single model. (file: ui/agijobmanager_genesis_job_mainnet_2026-03-05-v42.html)
  • Hydration and failure transparency: hydrate preview-driven fields with explicit messages (e.g. "Unavailable until preview(label) resolves", "Identity not yet issued", or parse-failure details for malformed tokenURI) instead of silent em‑dashes; token dossier load state is tracked. (file: ui/agijobmanager_genesis_job_mainnet_2026-03-05-v42.html)
  • Direct register parity & review: transaction review now reports FreeTrialSubdomainRegistrarIdentity name, contract address, method, args, ETH value (0), calldata and records APP_STATE.identity.parity before submission; the actual send path remains freeTrialRegistrarIdentity.methods.register(local.label).send({from:userAccount, value:'0'}) (no compatibility alias). (file: ui/agijobmanager_genesis_job_mainnet_2026-03-05-v42.html)
  • Copy and UX fixes: replace “Authoritative identity preview” with “Live preview(label) decision card” and clarify preview vs issuance authority; update review modal heading to “Alpha identity transaction review”. (file: ui/agijobmanager_genesis_job_mainnet_2026-03-05-v42.html)
  • Tests: add snapshot/regression assertions to ui/tests/standaloneV42.test.ts verifying decision-card wording, status map, expert fallback wording, and evidence of direct register review facts. (file: ui/tests/standaloneV42.test.ts)

Files changed

  • ui/agijobmanager_genesis_job_mainnet_2026-03-05-v42.html
  • ui/tests/standaloneV42.test.ts

Testing

  • Added unit/regression assertions in ui/tests/standaloneV42.test.ts that check the standalone v42 artifact contains the new decision-card copy, deterministic status mapping, expert fallback text, and direct register review facts; these assertions are present in the committed test file. (tests added)
  • Performed automated grep/inspection checks against the modified v42 HTML confirming the presence of the new functions/strings: nextIdentityRequestToken, deterministic IDENTITY_PREVIEW_STATUS, the expert fallback message preview(label) failed; expert direct register fallback available, and the direct .methods.register(local.label).send({from:userAccount, value:'0'}) send path; these checks succeeded in this environment. (inspection succeeded)
  • Attempted to run the Vitest suite locally (npm test / npx vitest) but the execution failed in this environment due to missing/misaligned toolchain dependencies (vitest binary not foundandvitest/configmodule resolution errors) and an interruptednpm ci (ENOTEMPTY` on existing node_modules), so the new tests could not be executed here. (test execution blocked by environment)
  • Commit recorded and files updated in the working tree; runtime verification recommended in a CI or local dev environment with a healthy Node toolchain to run the new test assertions and to validate live RPC behavior against mainnet (or a mainnet fork) for end-to-end parity checks. (manual CI validation recommended)

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: ddfad3ef9e

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

Comment on lines 5831 to 5833
}else if(recommendationModel.fallback){
tone='repair'; recommendation='register(label) fallback'; title='preview(label) read failed; expert register fallback available.'; body='rootHealth() is usable and local validation passed. You can proceed with direct register(label) at 0 ETH after explicit review while preview telemetry is degraded.';
}else{

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 Surface fallback before generic no-preview loading state

When preview(label) fails, deriveIdentityRecommendation can return { method: 'register', fallback: true } while preview is still null, but the earlier if(!baseLockedReason && local.ok && !preview) branch always matches first, so this fallback branch is never reached. In that scenario the UI continues to present a loading recommendation even though register fallback is actually enabled, creating contradictory guidance and hiding the explicit expert-fallback message this change intended to show.

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