Skip to content

Claim: Connect-first wallet UX (Connect Wallet then SIWE)#267

Merged
GsCommand merged 1 commit into
mainfrom
codex/fix-claim-wallet-auth-ux
May 22, 2026
Merged

Claim: Connect-first wallet UX (Connect Wallet then SIWE)#267
GsCommand merged 1 commit into
mainfrom
codex/fix-claim-wallet-auth-ux

Conversation

@GsCommand
Copy link
Copy Markdown
Contributor

Motivation

  • Improve the Claim page authentication UX so the initial button never appears to do nothing by switching from a SIWE-first flow to an explicit connect-first flow.

Description

  • Updated public/claim.html step 1 title and copy to Connect wallet and clarified that the wallet signs the login message while the Ed25519 key signs agent receipts.
  • Replaced the single SIWE button with a primary Connect Wallet button and a secondary Sign-In with Ethereum button that is revealed after a successful connection, and added copy listing supported injected browser wallets (MetaMask, Rabby, Coinbase Wallet, and other EIP-1193 wallets).
  • Implemented window.connectWallet to request accounts via ethereum.request({ method: 'eth_requestAccounts' }), surface clear errors (missing wallet, connection rejected), and display Wallet connected: 0x1234...abcd on success.
  • Adjusted window.signInWithEthereum to run after connection, fetching /api/auth/nonce, building the SIWE message, requesting personal_sign, posting to /api/auth/verify, and mapping visible failure states including signature rejected, nonce request failed, SIWE verification failed, domain mismatch, and unsupported chain.
  • Kept changes strictly frontend-scoped and avoided adding WalletConnect/AppKit, payment/provisioning features, ENS/ERC-8004 fakes, or backend endpoint modifications.

Testing

  • Ran npm test in the repository and all automated tests passed (30 tests, 0 failures).
  • Attempted npm install in the root which began but produced environment warnings; npm install for examples/webhook-auto-verify completed successfully.
  • npm run build failed because the repository has no build script (expected failure).
  • Ran examples/webhook-auto-verify checks via npm run check which succeeded.

Codex Task

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
commandlayer-commandlayer-org Ready Ready Preview, Comment May 22, 2026 2:46am
commandlayer-org Ready Ready Preview, Comment May 22, 2026 2:46am
commandlayer-org111 Ready Ready Preview, Comment May 22, 2026 2:46am

Request Review

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