Skip to content

Frontend v2 on Solana — new pet instructions, VRF recovery, and UI overhaul#60

Merged
aichannode merged 48 commits into
mainfrom
feat/frontend-v2-solana
Jun 24, 2026
Merged

Frontend v2 on Solana — new pet instructions, VRF recovery, and UI overhaul#60
aichannode merged 48 commits into
mainfrom
feat/frontend-v2-solana

Conversation

@tydreamer

Copy link
Copy Markdown
Contributor

Summary

Brings the frontend up to parity with the deployed v2 Solana program and gives the
app a substantial UI/architecture cleanup. Adds new on-chain instructions
(transfer_pet, sync_metadata), frontend-driven VRF settle with pending-tx
recovery, cross-owner (married) breeding, and a broad migration of buttons/modals
to the shared Neon component system.

EVM-first parity is preserved; Solana is wired to match.

On-chain (Solana program)

  • Add transfer_pet instruction and wire pet sending end-to-end
  • Add sync_metadata instruction support (+ level-up "Sync metadata" button)
  • Fix settle_breed / settle_mint and drop update_authority from the
    mpl-core asset create CPI
  • Add initialize and set-config deployment scripts; refresh program ID

Features

  • VRF lifecycle & recovery: expose an awaiting-vrf phase during the oracle
    wait, parse BattleResolved to return firstWins from the settle tx, and add
    pending-VRF recovery notices for both battle and breed
  • Cross-owner breeding: resolve parent2Owner for married pets, auto-select
    the married Solana pet, and show a spouse indicator in the breed panel
  • Stud fees: balance reader + withdraw_stud_fees action
  • Open to challenges: openToChallenges field, toggle action, and UI
  • Cancel flows: cancel_battle and cancel_breed support
  • Custom devnet RPC via VITE_SOLANA_DEVNET_RPC_URL; cluster-aware VRF timing
    for mainnet readiness; explorer URL resolved from the connection RPC endpoint
  • Drop backend sign-in requirement for the first pet

UI / Refactor

  • Migrate action buttons, dashboard hub, auth actions, and modals (create-pet,
    send-pet, marriage confirm) to the shared NeonButton / NeonModal system;
    extend the NeonButton palette
  • Decompose large panels (breed, marriage, battle setup) into focused part
    components; two-lane matchmaking layout and arena card redesign
  • Extract shared hooks (useSpousePet, usePetCooldowns) and formatExpiry
    into shared/utils/common/time
  • Add Prettier + EditorConfig and reformat src; tighten the
    no-explicit-any rule and remove dead CSS

Tests

  • New tests for Solana hooks (pending battle/breed, stud fees, sync metadata,
    open-to-challenges, adapter) and mapSolanaPet
  • Fix pre-existing CI failures in battle-setup and level-up tests; update breed
    panel tests for auto-select + spouse indicator

tydreamer added 30 commits June 19, 2026 10:04
@tydreamer tydreamer requested review from aichannode and cdsaidev June 24, 2026 12:27
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
do-not-stop-frontend Ready Ready Preview, Comment Jun 24, 2026 12:27pm
do-not-stop-website Ready Ready Preview, Comment Jun 24, 2026 12:27pm

@github-actions

Copy link
Copy Markdown

🧪 Coverage

Package Statements Branches Functions Lines Overall
backend 78.92% (573/726) 73.84% (288/390) 82.27% (130/158) 79.84% (531/665) 78.49% (1522/1939)
frontend 65.80% (1066/1620) 60.65% (851/1403) 66.75% (265/397) 66.23% (971/1466) 64.53% (3153/4886)
shared 54.40% (1137/2090) 55.46% (720/1298) 57.28% (228/398) 56.91% (1053/1850) 55.68% (3138/5636)

Comment thread backend/env.example
# SOLANA_PROGRAM_ID : CryptoPets program id (base58) whose accounts we index.
# HELIUS_RPC_URL=https://devnet.helius-rpc.com/?api-key=<your-helius-key>
# SOLANA_PROGRAM_ID=78AXV46ks5oFoJHkukvbsfZTJixdj2MeStzuC6thiUry
# SOLANA_PROGRAM_ID=88HGagCw4i3BTMHEpdQy3YLeHrkTSKgXmvq66HJXKM7k

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tydreamer it looks weird to have this here :)
can you please remove the value?
so the actual value will be in .env.staging and .env.production

@tydreamer tydreamer requested a review from aichannode June 24, 2026 14:21
@aichannode aichannode merged commit fb8e197 into main Jun 24, 2026
4 checks passed
@aichannode aichannode deleted the feat/frontend-v2-solana branch June 24, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants