Parallel analysis lane
Explore the file /home/akitav2/projects/4626/frontend/src/pages/deploy/DeployVault.tsx (it is ~10,800 lines) and its sibling files in /home/akitav2/projects/4626/frontend/src/pages/deploy/ (e.g. deployVaultHelpers.ts and anything else in that folder).
I need a structural map to plan a UI/UX redesign that preserves ALL logic. Report:
- The list of sibling files in frontend/src/pages/deploy/ with one-line descriptions.
- In DeployVault.tsx: the major top-level sections in render order (hero/header, launch checklist, creator coin card, phase sections 1/2/2b/3/4, dry-run panel, role policy health, CTA/deploy button, export plan JSON, etc.) with approximate line ranges.
- Key state variables / hooks used (deploy status state, dry-run state, readiness/preflight checks, admin checklist, vanity plan, batcher config, session gating). List the most important useState/useMemo/useEffect clusters and any reducer/state-machine if present.
- How addresses are rendered today — is there an existing address row component or inline JSX? How copy buttons / BaseScan links / local-fork labeling are done.
- What sub-components already exist that are imported into DeployVault (e.g. ShareBridgeFinalizeWiringPanel, AddOwnerSigningPanel, anything under src/components related to deploy).
- How the "1-Click Deploy" CTA gating works (what conditions enable it) and the dry-run button flow at a high level.
- Any existing CSS/Tailwind patterns or design tokens used on this page (class names, btn-* usage, components/ui imports).
Be thorough — medium-to-very-thorough. Return a structured report with line ranges so I can plan a decomposition.
Analysis
Mapping the deploy folder and scanning DeployVault.tsx structure for sections, state, and components.
[REDACTED]
Tools invoked: UpdateCurrentStep, Glob, Grep, Grep
Analysis
[REDACTED]
Tools invoked: Grep, Grep, Grep, Read, Read, Read
Analysis
[REDACTED]
Tools invoked: Read, Read, Grep, Grep
Analysis
[REDACTED]
Tools invoked: Grep, Read, Read, Read, Read
Analysis
[REDACTED]
Tools invoked: Grep, Read, Read, Read, Read, Read
Analysis
[REDACTED]
Tools invoked: Grep, Read, Read, Read, Read, Read
Analysis
[REDACTED]
Tools invoked: Read, Read, Grep, Read, Read, Glob
Analysis
[REDACTED]
Tools invoked: Grep, Read, Read, Grep
Analysis
[REDACTED]
Tools invoked: Grep, Read, Read, Read
Analysis
[REDACTED]
Tools invoked: Grep, Read, Grep
Analysis
[REDACTED]
Tools invoked: Read, Read, Grep, Read
Analysis
[REDACTED]
Tools invoked: Read, Grep, Grep
Analysis
[REDACTED]
Tools invoked: Grep, Read, Read
Analysis
[REDACTED]
Tools invoked: Read, Grep, Read
Analysis
[REDACTED]
Tools invoked: Read, UpdateCurrentStep
Analysis
[REDACTED]
Tools invoked: Grep
Analysis
Deploy Vault structural map
For a UI/UX redesign that preserves logic, treat DeployVault.tsx as three layers: module-level constants/ABIs (~lines 1–2271), DeployVaultBatcher (deploy engine + plan UI, ~2375–8432), and DeployVaultMain (page shell + gating, ~8434–10812). There is no useReducer — state is useState + many useQuery/useMemo/useEffect clusters.
1. Sibling files in frontend/src/pages/deploy/
| File | One-line description |
|---|---|
DeployVault.tsx | Monolithic page: error boundary, ~4k lines of ABIs/helpers, DeployVaultBatcher (session submit/dry-run/plan UI), DeployVaultMain (auth/gating shell). |
deployVaultHelpers.ts | Pure vanity/address/normalization helpers, salt search messages, share-OFT vanity start — extracted for unit tests. |
deployVaultSignatureUtils.ts | AA signature extraction, debug logging, timeout helpers — side-effect-free except optional logger. |
deployVaultSignals.ts | Timeline progress derivation, provider-collision detection, share-vanity skip log keys. |
deployVaultVanityPersistence.ts | localStorage cache for vanity plan version/salt search outcomes. |
Deploy.tsx | /deploy landing: lazy-loads DeployChoiceCards with SEO shell. |
DeployChoiceCards.tsx | 3D WebGL coin vs vault chooser cards linking to /deploy/coin and /deploy/vault. |
DeployCoin.tsx | /deploy/coin — header + LaunchCoinCard for Zora Creator Coin launch. |
DeployVaultDryRun.test.ts | Static wiring tests: dry-run route, local-fork gate, H-2 busy-lock regression. |
deployVaultVanity.test.ts | Unit tests for vanity search helpers in deployVaultHelpers.ts. |
deployVaultVanityPersistence.test.ts | Tests for vanity plan localStorage persistence. |
deployVaultSignals.test.ts | Tests for timeline/signal helpers. |
2. DeployVault.tsx — top-level structure & render order
File regions (for decomposition)
| Region | Lines (approx.) | Role |
|---|---|---|
| Imports + constants | 1–155 | Wagmi/Privy, @/lib/deploy/*, @/features/deploy-vault/deploySteps, UI imports |
| ABIs, types, utilities | 156–903 | EntryPoint assert, error patterns, DeployVaultErrorBoundary, sanitizeDeployVaultError |
export function DeployVault() | 968–996 | Privy-disabled shell → else wrap DeployVaultMain in boundary |
| More ABIs + batcher ABIs | 1066–2271 | Large inline contract ABIs used by submit/preflight |
AddressRow | 2273–2334 | Inline address row component |
| Role policy label parsers | 2336–2373 | Pure helpers for role-policy UI |
DeployVaultBatcher | 2375–8432 | All deploy execution, queries, plan timeline, CTAs |
DeployVaultMain | 8434–10812 | Page layout, identity/gating, mounts DeployVaultBatcher |
DeployVaultMain render order (~10249–10811)
| Section | Lines | Notes |
|---|---|---|
| Page shell | 10249–10253 | vault-shell, PageMeta, cinematic-section, max-width container |
| Hero / header | 10255–10323 | Label “Deploy”, headline, Coin/Vault tab pills, Base pill |
| External signer nudge | 10269–10317 | Amber motion.div when Privy authed but !smartWalletCapabilityReady — Rabby/MetaMask/CBW connect |
| One-time owner approval | 10325–10425 | Purple panel #owner-approval-setup: prolink, copy, Base Account connect, Approve Once |
| Deployment status | 10427–10467 | DeploymentSuccess / AlreadyDeployedBanner, pending/stale local record banners |
| Post-deploy vault icon | 10469–10487 | VaultImageGenerator when alreadyDeployed |
| Admin launch checklist | 10489–10525 | Admin-only; min coin age input + firstLaunchChecklist dots |
Main card (vault-surface) | 10527–10804 | Only when !alreadyDeployed |
| ↳ Creator coin review | 10530–10603 | Zora avatar, name/symbol, full address string, coin-type pill, auth warnings |
| ↳ Deploy subsection | 10605–10803 | Label “Deploy”, long if/else auth/gating ladder, then DeployVaultBatcher or disabled button |
| ↳ Deploy blocker footer | 10758–10788 | deployBlocker copy + optional LaunchCoinCard / Zora handoff |
| ↳ Debug toggle | 10791–10798 | cv:debug localStorage toggle |
| ↳ Deposit footnote | 10800–10802 | 50M token deposit note |
Note: There is no manual creator-token input in JSX. creatorToken is autofilled from Zora profile (wagmi or Privy wallet) or set via LaunchCoinCard.onCoinCreated. URL ?token= is stripped (8890–8900) but never read into state.
DeployVaultBatcher render order (~7490–8430)
| Section | Lines | Notes |
|---|---|---|
| Intro copy | 7490–7520 | Server-continue vs 4-op explanation; stale auth warning |
| Vanity notices | 7509–7520 | Custom/default vanity messages |
Deployment plan (<details>) | 7522–8191 | Collapsible “Canonical stage timeline” |
| ↳ Setup / workflow | 7541–7584 | Timeline summary, owner approval, initial deposit, active batcher, deploy mode |
| ↳ Phase 1 | 7586–7670 | Core vault/wrapper/share + shared infra rows |
| ↳ Phase 2 core | 7672–7727 | Gauge/CCA/oracle + phase2 shared infra |
| ↳ Pipe A / Share bridge | 7728–7736 | ShareBridgeFinalizeWiringPanel |
| ↳ Phase 2b OVault mesh | 7737–7883 | Solana lanes, explorer links, mesh status grid |
| ↳ Phase 2 finalize rows | 7884–7941 | Burn stream, payout router, policy controller, payout recipient |
| ↳ Phase 3 | 7944–8098 | Strategies + impairment claims/escrow + Charm/Ajna addresses |
| ↳ Phase 4 | 8100–8136 | Auction + CCA floor + cleanup stage |
| ↳ Export / dry-run | 8138–8190 | Buttons + dry-run result/failure detail |
| ERC-4337 summary | 8193–8205 | Sender address + smart-wallet balance |
| Runtime batcher warning | 8207–8223 | Dismissible amber banner from /api/deploy/config |
| Role policy health | 8225–8328 | Diagnostics query + canary override input |
| 1-Click Deploy CTA | 8330–8378 | Primary button or “ERC-4337 Setup Required” panel |
| Disabled reason / errors / tx | 8380–8429 | Amber blocker, red error (with Basescan tx links), submitted tx id |
3. Key state, hooks, and logic clusters
No reducer / state machine
Phase tracking uses phase string union ('idle' \| 'phase1' \| … \| 'done') plus lastSessionStep from server polling — not a formal reducer.
DeployVaultMain — primary state (~8434+)
| Cluster | Mechanism | Purpose |
|---|---|---|
| Auth / wallets | usePrivy, useWallets, useSmartWallets, useAccount, useSiweAuth, useAccountMe | Session, embedded EOA, canonical CSW, external EOA |
creatorToken | useState('') + autofill effects (8988–9007) | Creator coin address (profile-driven) |
| Owner-install | addPrivySmartWalletOwner*, auto-retry effects (~9945+) | One-time Privy smart wallet as CSW owner |
| External connect | externalWalletConnectBusy/Error, connectExternalSignerWallet | Rabby/MetaMask/CBW for deploy signing |
| Admin | minCoinAgeDays, isAdmin via /api/auth/admin | Launch checklist tuning |
| Deployment tracking | useDeploymentTracker, justCompletedDeployment | 1 deploy per CSW per version; auction completion gate |
| Identity | resolveCreatorIdentity, owner queries, identityBlockingReason | Canonical CSW vs connected wallet |
| Eligibility | evaluateDeployEligibility, canDeploy, deployBlocker | Page-level deploy gate (10064–10242) |
| Infra readiness | bytecodeInfraQuery, entryPointBytecodeQuery, creatorAllowlistQuery | Batcher, bytecode store, allowlist, EntryPoint |
| Market floor | marketFloorQuery | CCA floor display (UI reference) |
| Derived names | derivedShareSymbol/Name, derivedVaultSymbol/Name (9068–9087) | Token naming for deploy payload |
DeployVaultBatcher — primary state (~2375+)
| State | Lines | Purpose |
|---|---|---|
batcherOverride, deploymentVersionOverride | 2447–2449 | Sync from /api/deploy/config |
busy, phase, phaseTxs, txId, lastSessionStep | 2579–2602 | Live deploy progress |
dryRunBusy, dryRunResult, dryRunError | 2580–2582 | Local-fork dry-run |
exportBusy, exportStatus | 2583–2584 | Plan JSON download |
runtimeBatcherConfigError, runtimeBatcherWarningDismissed | 2586–2587 | Runtime config warning |
ovaultMeshStatus, seenOvaultMeshStep | 2591–2592 | Phase 2b mesh preflight |
rolePolicyOverrideInput | 2607–2611 | Canary role-policy ID |
| Session persistence | deploySessionStorageKey, persistDeploySession, loadDeploySession | localStorage session resume |
| Vanity caches | shareOftVanityCacheRef, vaultVanityVersionCacheRef | WASM/version search memo |
Major query clusters (DeployVaultBatcher)
rolePolicyDiagnosticsQuery—/api/deploy/v2/session/role-policy/resolvebatcherInfraQuery/batcherSharedInfraQuery— on-chain batcher modulesvanityPlanQuery—resolveDeployVanityPlanexpectedAddressesQuery— deterministic CREATE2 planmainnetAddressCodeQuery— fork vs mainnet bytecode (local-fork labeling)- Runtime config effect (3453–3485) — fetches
/api/deploy/config, sets overrides
Session / submit hook
useDeploySessionV2()(2761):postSessionRequest,pollSessionsubmit()(~4555–7233): builds plan, creates session, UserOps / server-continue, phase orchestrationexportPlan()(7235–7261):submit({ planOnly: true, validateDepositBalance: true })→ JSON blob downloadrunDryRun()(7263–7288):planOnly→POST /api/deploy/v2/session/dry-run
Timeline helpers
Imported from @/features/deploy-vault/deploySteps: DEPLOY_TIMELINE_STAGES, timelineStageFromDeployStep, etc.
Progress UI uses deployVaultSignals.ts: deriveDeployTimelineProgressState, summarizeDeployTimelineProgress.
4. Address rendering today
Primary component: inline AddressRow (2273–2334)
Not a shared @/components export — lives in this file.
Props: label, address, deployed?, forkOnly?, variant?: 'default' \| 'shared', dryRunPassed?
Behavior:
- Full address in
font-mono, right-aligned forkOnly: amber text +(local fork)— no Basescan linkdeployed === false:(pending);null:(checking…)- Live on mainnet:
<a href="https://basescan.org/address/{a}">— full address, not truncated - No copy button on
AddressRow(copy exists only on owner-approval prolink, 10354–10371)
Truncation helper: shortAddress (775) used in prose, checklist hints, errors — not in AddressRow links.
Solana addresses: bytes32ToSolanaAddress + solanaExplorerAddressUrl (818+) — direct Solana explorer links in Phase 2b block (7777–7847), separate from AddressRow.
Tx links: hrefForTx → https://basescan.org/tx/{hash} for phase “view tx” and error parsing (3365–3370, 8388–8400).
5. Sub-components imported into DeployVault
From @/components/deploy/
| Component | Used in | Role |
|---|---|---|
ShareBridgeFinalizeWiringPanel | DeployVaultBatcher ~7729 | Pipe A finalize wiring preflight |
RequestCreatorAccess | DeployVaultMain gating ladder ~10645+ | Allowlist denied / error |
DeploymentSuccess, AlreadyDeployedBanner | DeployVaultMain ~10429+ | Post-deploy / already-deployed |
VaultImageGenerator | DeployVaultMain ~10480 | Post-deploy AI token icon |
Not imported: DeployStrategies.tsx (exists in folder but unused here).
Not imported: AddOwnerSigningPanel — owner install is inline in the purple panel (~10325–10425).
From other feature areas
| Component | Role |
|---|---|
LaunchCoinCard (@/features/waitlist/LaunchCoinCard) | Creator coin creation when blocked (~10772) |
PageMeta | SEO |
Button, LoadingInline, LoadingText | @/components/ui/* |
Internal (same file)
DeployVaultErrorBoundary(905–966)AddressRow(2273–2334)DeployVaultBatcher(2375–8432)DeployVaultMain(8434–10812)
6. CTA gating — two layers
A. Page gate: canDeploy (DeployVaultMain, 10064–10085)
All must be true before DeployVaultBatcher mounts:
- Valid creator coin address + Zora
CREATORtype canonicalIdentityType === 'contract'- Coin age ≥
minCoinAgeDays(admin-tunable) - Authorized deployer (
!identityBlockingReason) - Allowlist success + pass (or disabled mode)
- Derived share/vault names/symbols
connectedWalletAddresspresent- CSW holds ≥ 50M creator tokens (
fundingGateOk) - Batcher configured + bytecode infra OK
- Solana override inputs valid (if set)
deployEligibility.canProceedWithDeploySessionsmartWalletCapabilityReady
smartWalletCapabilityReady (10020–10027): strict no-EOA → embedded/smart-wallet owner; else Coinbase Wallet direct, embedded owner, connected EOA owner, or Privy smart wallet paths.
Above DeployVaultBatcher: long conditional chain (10612–10755) handles sign-in, allowlist, identity, batcher, balance, owner approval scroll-target, etc.
B. Batcher gate: disabled + hasDeploySignerPath (DeployVaultBatcher)
disabledReason (7309–7327) blocks the 1-Click Deploy button when:
busy, role-policy parse error, batcher infra loading/error, vanity plan loading, expected-addresses loading/missing
hasDeploySignerPath (7332–7334): must have a viable ERC-4337 signer lane (same strict/default rules as above).
1-Click Deploy button (~8349–8357):
disabled={disabled || exportBusy || dryRunBusy}
onClick={() => void submit()}
Label: '1‑Click Deploy (Gas-Free)' when not busy.
If !hasDeploySignerPath, shows amber ERC-4337 Setup Required panel instead (8360–8377).
Dry-run flow (high level)
- Gate:
dryRunLocalForkRpc=isLocalForkRpcUrl(VITE_BASE_RPC)— button hidden outside local fork; showspnpm run dev:deploy-dry-runhint (8148–8161). - Click
Run dry-run:runDryRun()setsdryRunBusy, clears prior results. - Plan build:
submit({ planOnly: true })— same path as deploy but no chain submission. - API:
POST /api/deploy/v2/session/dry-runwithplan.sessionCreateRequest, timeout fromVITE_DEPLOY_DRY_RUN_REQUEST_TIMEOUT_MS. - UI:
normalizeDryRunResponse→ success/failure message; phase rows get green ✓ viadryRunPassedonAddressRow. - Safety:
dryRunBusyalso blockssubmit()and export (H-2 regression test).
Export Plan JSON: same planOnly path with validateDepositBalance: true, downloads deploy-plan-{token}-{ts}.json.
7. CSS / Tailwind / design tokens
Layout / brand shells (global classes, not raw btn-*)
vault-shell— page wrappercinematic-section— section spacingvault-surface,vault-surface-muted,vault-hover-lift— cardsvault-pill— Base chain badgelabel,headline— typography (hero)text-brand-primary,text-brand-accent— coin avatar fallback gradient
Color system (heavy inline Tailwind)
- Zinc scale for body/copy (
text-zinc-400/500/600, bordersborder-zinc-900/50) - Amber panels: warnings, identity mismatch, owner/setup (
border-amber-500/25,from-amber-500/16) - Purple owner-approval panel
- Emerald success / dry-run pass / creator coin pill
- Sky shared-infra rows in plan (
variant="shared"onAddressRow) - Blue dry-run in-progress, primary actions via
Button variant="primary"
UI components (preferred over legacy btn-*)
Buttonfrom@/components/ui/Button—variant="primary" \| "secondary"LoadingInline,LoadingTextfrom@/components/ui/LoadingState- Disabled CTAs still use raw
<button className="w-full py-4 bg-black/30 border border-zinc-900/60 …">in the gating ladder (not<Button>)
Motion
framer-motion—motion.divon external-signer nudge and creator coin review expand (10531–10535)
Icons
lucide-react:ChevronDown,ExternalLink
Suggested decomposition boundaries (for redesign)
| Extract target | Current lines | Rationale |
|---|---|---|
DeployVaultPlanTimeline.tsx | 7522–8191 | Largest UI block; pure display + AddressRow |
DeployVaultAddressRow.tsx | 2273–2334 | Reused ~40× in timeline |
DeployVaultOwnerApprovalPanel.tsx | 10325–10425 | Distinct purple flow |
DeployVaultGatingLadder.tsx | 10612–10755 | Long if/else → state machine UI |
useDeployVaultPageState.ts | DeployVaultMain hooks | Identity, canDeploy, queries |
useDeployVaultSession.ts | DeployVaultBatcher submit/poll | Keep submit/dry-run/export intact |
ABIs → deployVaultAbis.ts | 1066–2271 | Shrinks file ~1.2k lines with zero behavior change |
This map should let you redesign layout/copy/visual hierarchy while keeping submit(), canDeploy, session storage, and query keys as the logic boundary.
[REDACTED]
Was this page helpful?