Skip to content

Fix v42 Alpha-Agent identity console state coherence and register fallback - #181

Open
MontrealAI wants to merge 1 commit into
mainfrom
codex/fix-alpha-agent-console-in-v42-ui
Open

Fix v42 Alpha-Agent identity console state coherence and register fallback#181
MontrealAI wants to merge 1 commit into
mainfrom
codex/fix-alpha-agent-console-in-v42-ui

Conversation

@MontrealAI

Copy link
Copy Markdown
Owner

Motivation

  • Repair the broken Alpha-Agent Free Trial & Identity Console in the v42 standalone artifact so preview/read gating, recommendations, and the primary register(label) path are coherent and contract-faithful.
  • Prevent stale async reads and mixed partial state from showing contradictory UI (e.g., “Loading preview” while buttons are enabled) by introducing a single-source snapshot and freshness token.
  • Replace semantically incorrect copy that implied preview(label) was authoritative and provide a clear, review-first expert fallback when preview telemetry fails but root health is usable.

Description

  • Implemented a request-token freshness model with requestSeq/activeRequestId, nextIdentityRequestId(), isCurrentIdentityRequest() and buildIdentitySnapshot() to keep a single identity snapshot per chain/contract/label/wallet/request.
  • Reworked the identity UI state derivation in deriveAlphaIdentityUiState() to deterministically map preview.status to recommendations and to prevent contradictory loading/enablement combinations, and added canExpertFallback logic for a guarded fallback path.
  • Hardened refreshIdentityState() to record previewError and to ignore stale async responses, and improved hydration text for token fields so missing data is explained (e.g., Not issued yet, preview unavailable).
  • Removed the misleading copy Authoritative identity preview and replaced it with Live preview(label) decision card, while keeping the primary write route direct and contract-faithful (FreeTrialSubdomainRegistrarIdentity.register(string) at 0x7811993CbcCa3b8bb35a3d919F3BA59eeFbeAA9a with 0 ETH).
  • Files changed: ui/agijobmanager_genesis_job_mainnet_2026-03-05-v42.html, ui/tests/standaloneV42.test.ts.

Testing

  • Ran npx vitest run tests/standaloneV42.test.ts and the updated standalone v42 tests passed (5 tests, all green).
  • An initial npm test -- --run ui/tests/standaloneV42.test.ts invocation failed due to the repository Vitest include filter (no test files matched that CLI glob), but the explicit npx vitest run validated the new assertions successfully.
  • The updated tests check: presence of Live preview(label) decision card copy, removal of Authoritative identity preview, presence of stale-request guards (buildIdentitySnapshot / isCurrentIdentityRequest), and preview-fallback messaging.

Codex Task

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