feat(frontend): landing page refresh — value props grid and live demo (#356) - #464
Open
Obiajulu-gif wants to merge 2 commits into
Open
feat(frontend): landing page refresh — value props grid and live demo (#356)#464Obiajulu-gif wants to merge 2 commits into
Obiajulu-gif wants to merge 2 commits into
Conversation
…Epta-Node#356) Adds two new sections between the stats bar and the specialist-agents grid: - ValuePropsSection: a 4-card grid (on-chain discovery, autonomous orchestration, instant Stellar payments, composable workflows), each with an icon, animating in on scroll (framer-motion whileInView, staggered). - LiveDemoSection: pairs a fixed example workflow walkthrough (the market-entry-report scenario already described in the README's demo section, presented as a staggered Research -> Risk -> Report reveal) with a "Live Network Activity" panel showing REAL numbers fetched from GET /api/stats (total tasks, active agents, XLM paid out, uptime) — the only public, no-wallet-required endpoint available (getRecentTasks needs a wallet address, so isn't usable for an anonymous landing page visitor). Loading and error states included. Both new sections plus the existing StatsBar/SpecialistAgentsSection animate on scroll via framer-motion's whileInView; Hero animates in on load (it's already in the viewport on page load, so whileInView isn't the right trigger there — it uses a staggered `animate="visible"` instead). ## Necessary prerequisite: Hero.tsx had mismatched JSX tags and didn't compile Hero.tsx opened `<motion.section>`/`<motion.div>`/`<h1>`/`<p>` but closed several of them with the WRONG tag (`</section>`, `</motion.div>` closing a plain `<div>`, `</motion.h1>` closing a plain `<h1>`, etc.) — a different corruption pattern than the "two versions concatenated" bug found across backend/ this session (see Epta-Node#443/Epta-Node#460/Epta-Node#461/ Epta-Node#463), but equally blocking: the file was invalid JSX and neither Hero.test.tsx nor the landing page itself could ever have compiled as committed. Fixed by making every motion.* tag consistent (open and close both `motion.*` or both plain) and importing `motion`/defining `containerVariants`, which were also missing. While in there, converted the hero's per-element `animationDelay` + CSS `slide-up` class approach to framer-motion's `staggerChildren`, which is what the rest of the landing page already uses. Also added an `IntersectionObserver` mock to `vitest.setup.ts` — jsdom doesn't provide one, and framer-motion's `whileInView` (used throughout this page, including the pre-existing StatsBar/SpecialistAgentsSection) needs it. No landing-page test had ever actually mounted a `whileInView` component before (Hero.tsx didn't compile, and StatsBar/ SpecialistAgentsSection have no test files), so this gap was never hit until now. ## Acceptance Criteria - [x] Hero and sections animate on scroll - [x] Demo section shows a real orchestrated workflow result from API — via the live GET /api/stats panel; the step-by-step walkthrough itself is a labeled, fixed example (there's no public "get a random real task" endpoint to pull a literal historical run from without requiring a connected wallet), paired with real aggregate numbers from actual completed workflows. ## Test plan npx vitest run src/components/landing/ — 9/9 passing (3 Hero, 2 ValuePropsSection, 4 LiveDemoSection: immediate render of the example steps without waiting on the API, loading state, real stats rendered once loaded, graceful fallback on API failure). `npx tsc --noEmit` reports zero errors in any file this PR touches. It does surface the same JSX-tag-mismatch corruption pattern in three unrelated pre-existing files (App.tsx, components/wallet/SendXLMForm.tsx, context/ToastContext.tsx) — out of scope here, flagging separately. Closes Epta-Node#356
|
@Obiajulu-gif Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
@Obiajulu-gif is attempting to deploy a commit to the Jaja's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two new sections between the stats bar and the specialist-agents grid:
whileInView, staggered).GET /api/stats(total tasks, active agents, XLM paid out, uptime) — the only public, no-wallet-required endpoint available (getRecentTasksneeds a wallet address, so isn't usable for an anonymous landing page visitor). Loading and error states included.Both new sections plus the existing
StatsBar/SpecialistAgentsSectionanimate on scroll via framer-motion'swhileInView;Heroanimates in on load (it's already in the viewport on page load, sowhileInViewisn't the right trigger there — it uses a staggeredanimate="visible"instead).Necessary prerequisite:
Hero.tsxhad mismatched JSX tags and didn't compileHero.tsxopened<motion.section>/<motion.div>/<h1>/<p>but closed several of them with the wrong tag (</section>,</motion.div>closing a plain<div>,</motion.h1>closing a plain<h1>, etc.) — a different corruption pattern than the "two versions concatenated" bug found acrossbackend/this session (see #443/#460/#461/#463), but equally blocking: the file was invalid JSX and neitherHero.test.tsxnor the landing page itself could ever have compiled as committed. Fixed by making everymotion.*tag consistent (open and close bothmotion.*or both plain) and importingmotion/definingcontainerVariants, which were also missing. While in there, converted the hero's per-elementanimationDelay+ CSSslide-upclass approach to framer-motion'sstaggerChildren, which is what the rest of the landing page already uses.Also added an
IntersectionObservermock tovitest.setup.ts— jsdom doesn't provide one, and framer-motion'swhileInView(used throughout this page, including the pre-existingStatsBar/SpecialistAgentsSection) needs it. No landing-page test had ever actually mounted awhileInViewcomponent before (Hero.tsxdidn't compile, andStatsBar/SpecialistAgentsSectionhave no test files), so this gap was never hit until now.Acceptance Criteria
GET /api/statspanel; the step-by-step walkthrough itself is a labeled, fixed example (there's no public "get a random real task" endpoint to pull a literal historical run from without requiring a connected wallet), paired with real aggregate numbers from actual completed workflows.Test plan
npx vitest run src/components/landing/— 9/9 passing (3 Hero, 2 ValuePropsSection, 4 LiveDemoSection: immediate render of the example steps without waiting on the API, loading state, real stats rendered once loaded, graceful fallback on API failure).npx tsc --noEmitreports zero errors in any file this PR touches. It does surface the same JSX-tag-mismatch corruption pattern in three unrelated pre-existing files (App.tsx,components/wallet/SendXLMForm.tsx,context/ToastContext.tsx) — out of scope here, flagging separately.Closes #356