Skip to content

feat(web): Discover hero — floating DePIN sector coins - #2

Merged
gamween merged 17 commits into
mainfrom
feat/frontend
Jun 18, 2026
Merged

feat(web): Discover hero — floating DePIN sector coins#2
gamween merged 17 commits into
mainfrom
feat/frontend

Conversation

@gamween

@gamween gamween commented Jun 18, 2026

Copy link
Copy Markdown
Owner

Summary

New connected-app landing Discover: five floating DePIN sector coins (GPU / Wireless / Mapping / Energy / Storage). Hover a coin → the sector's max APR; click → a menu of the sector's risk-class pools (A/B/C) → selecting a row opens that pool in the existing Deposit flow.

What's included

  • web/src/lib/sectors.js — pure pool→sector grouping + per-class/max APR (single source of truth; Explore refactored to consume it, no behavior change)
  • web/src/components/Discover.jsx + components/discover/{SectorCoin,SectorCoins,layout,discover.css}
  • Additive routing in App.jsx + TopNav.jsxno existing handler or contract call changed
  • motion dependency, lazy-loaded so it splits into its own async chunk (main bundle 760 KB → 628 KB)
  • Keyboard a11y for the class menu (focus, arrows, Escape); prefers-reduced-motion guard
  • New Vitest + React Testing Library harness; 20 tests; spec + plan under docs/superpowers/

Tests / build

  • pnpm -C web test → 20/20 pass
  • pnpm -C web build → clean

Notes

Foundation for an upcoming 3D Discover redesign (separate branch/PR) which will swap the visual layer while reusing this data layer + routing. Deferred polish tracked in the plan doc.

🤖 Generated with Claude Code

gamween added 17 commits June 17, 2026 00:15
Replace the static Discover import with React.lazy() + Suspense so that
framer-motion/motion (~132 KB) lands in a separate async chunk instead of
the main bundle. Main bundle: 760 → 628 KB (−17%); Discover chunk: 132 KB.
Add App.test.jsx covering the routing paths that unit tests don't exercise:
- connected app lands on Discover (lazy-loads) with Discover nav item active
- GPU coin → class B row → onOpenDeposit(1) → setTab("deposit"), verified
  by Deposit nav button gaining aria-current="page"

Mocks useWallet (returns connected account) and useContracts (returns
configured contracts with getPools/getDeals/getRoles/getHbarBalance +
DepositCard helpers). Adds a ResizeObserver stub for jsdom compatibility.
Copilot AI review requested due to automatic review settings June 18, 2026 21:50
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
wafer Ready Ready Preview, Comment Jun 18, 2026 9:50pm

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gamween
gamween merged commit abbfb74 into main Jun 18, 2026
6 checks passed
@gamween
gamween deleted the feat/frontend branch June 18, 2026 21:51
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