Fix v42 Alpha-Agent identity console: consistent preview snapshot, deterministic recommendations, direct register review - #182
Conversation
There was a problem hiding this comment.
💡 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".
| }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{ |
There was a problem hiding this comment.
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 👍 / 👎.
Motivation
preview(label)androotHealth()produce a single coherent state snapshot and the UI never shows contradictory loading/ready/button states.FreeTrialSubdomainRegistrarIdentity.register(string)path (0 ETH) with explicit transaction review facts and no legacy compatibility indirection.Description
APP_STATE.identitywithpreviewLabel,requestId,activeRequestId,asyncanderrorsbuckets,recommendation, andparitymetadata to make all panels derive from the same snapshot. (file:ui/agijobmanager_genesis_job_mainnet_2026-03-05-v42.html)nextIdentityRequestToken()andisCurrentIdentityRequest()and guard all async read-handlers inrefreshIdentityState()so stale RPC responses cannot overwrite newer label state. (file:ui/agijobmanager_genesis_job_mainnet_2026-03-05-v42.html)deriveIdentityRecommendation(preview, rootHealth, local)that mapspreview.status0..8 to exact recommended methods and exposes an explicit expert fallback whenpreview(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)ui/agijobmanager_genesis_job_mainnet_2026-03-05-v42.html)FreeTrialSubdomainRegistrarIdentityname, contract address, method, args, ETH value (0), calldata and recordsAPP_STATE.identity.paritybefore submission; the actual send path remainsfreeTrialRegistrarIdentity.methods.register(local.label).send({from:userAccount, value:'0'})(no compatibility alias). (file:ui/agijobmanager_genesis_job_mainnet_2026-03-05-v42.html)ui/agijobmanager_genesis_job_mainnet_2026-03-05-v42.html)ui/tests/standaloneV42.test.tsverifying decision-card wording, status map, expert fallback wording, and evidence of directregisterreview facts. (file:ui/tests/standaloneV42.test.ts)Files changed
Testing
ui/tests/standaloneV42.test.tsthat check the standalonev42artifact 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)v42HTML confirming the presence of the new functions/strings:nextIdentityRequestToken, deterministicIDENTITY_PREVIEW_STATUS, the expert fallback messagepreview(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)npm test/npx vitest) but the execution failed in this environment due to missing/misaligned toolchain dependencies (vitestbinary 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)Codex Task