Skip to content

feat(dashboard): add How It Works flow diagram to landing page#37

Merged
duyet merged 1 commit into
mainfrom
claude/landing-how-it-works
Mar 17, 2026
Merged

feat(dashboard): add How It Works flow diagram to landing page#37
duyet merged 1 commit into
mainfrom
claude/landing-how-it-works

Conversation

@duyet
Copy link
Copy Markdown
Owner

@duyet duyet commented Mar 17, 2026

Summary

  • Add a "How it works" section to the landing page with a 3-step animated flow diagram
  • Steps: Send (POST), Store (database), Retrieve (GET) with inline SVG icons
  • Animated connecting arrows between steps on desktop (hidden on mobile)
  • Follows existing landing page conventions (card styling, animation delays, stroke-based SVGs)

Test plan

  • Biome lint passes
  • TypeScript type check passes
  • Next.js production build succeeds
  • Visual check: section appears between Code Example and Features sections
  • Visual check: 3 cards in horizontal grid on desktop, stacked on mobile
  • Visual check: animated dots travel along connecting arrows on desktop

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added a new "How It Works" section to the landing page featuring three steps with visual indicators and icons.

…page

Add a 3-step flow diagram (Send, Store, Retrieve) with inline SVG icons
and animated connecting arrows between steps on desktop.

Co-Authored-By: Duyet Le <me@duyet.net>
Co-Authored-By: duyetbot <bot@duyet.net>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Sorry @duyet, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new "How it works" section to the dashboard's landing page. The primary goal is to provide users with a clear, visual understanding of the system's core functionality through an interactive, animated three-step flow diagram, enhancing user comprehension and engagement with the product.

Highlights

  • New "How it works" section: Added a "How it works" section to the landing page, featuring a 3-step animated flow diagram.
  • Animated flow diagram: Implemented a 3-step animated flow diagram (Send, Store, Retrieve) with inline SVG icons to visually explain the system's process.
  • Desktop animations: Included animated connecting arrows between steps for desktop views, which are hidden on mobile.
  • Design consistency: Ensured the new section adheres to existing landing page conventions, including card styling, animation delays, and stroke-based SVGs.
Changelog
  • packages/dashboard/src/app/page.tsx
    • Imported the new HowItWorks component.
    • Rendered the HowItWorks component within the main landing page structure.
  • packages/dashboard/src/components/landing/how-it-works.tsx
    • Created a new React component HowItWorks to encapsulate the "How it works" section.
    • Defined the three steps (Send, Store, Retrieve) with labels, sublabels, and custom SVG icons.
    • Implemented ConnectingArrow components for animated desktop-only visual transitions between steps.
    • Included SendIcon, StoreIcon, and RetrieveIcon functional components for the animated SVG graphics.
Activity
  • Biome lint passed.
  • TypeScript type check passed.
  • Next.js production build succeeded.
  • Visual check: section appears between Code Example and Features sections.
  • Visual check: 3 cards in horizontal grid on desktop, stacked on mobile.
  • Visual check: animated dots travel along connecting arrows on desktop.
  • The PR was generated with Claude Code.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 17, 2026

📝 Walkthrough

Walkthrough

A new HowItWorks component is introduced to the landing page that displays a series of instructional steps with icons and animated connecting arrows. The component is added to the component library and integrated into the landing page.

Changes

Cohort / File(s) Summary
Landing Page Integration
packages/dashboard/src/app/page.tsx
Import and render of new HowItWorks component within the landing page, positioned between the code example and Features section.
How It Works Component
packages/dashboard/src/components/landing/how-it-works.tsx
New client-side React component that renders a "How it works" section with three predefined steps, each displaying a numeric badge, icon, label, and sublabel. Includes internal ConnectingArrow and SVG icon helper components (SendIcon, StoreIcon, RetrieveIcon).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Poem

🐰 Three steps we show with icons bright,
A path unfolding, clear and right,
With arrows dancing, smooth and true,
The journey mapped from start to you! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a new 'How It Works' flow diagram component to the landing page, which is the primary focus of both files modified.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/landing-how-it-works
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a new "How it works" section to the landing page, which is a nice enhancement. The implementation in the new how-it-works.tsx component is well-structured. I have a couple of minor suggestions to improve the readability and maintainability of the ConnectingArrow component by defining a type for its props and making a CSS calculation more explicit.

);
}

function ConnectingArrow({ position }: { position: "left" | "right" }) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

For better readability and maintainability, consider defining a separate type or interface for the component's props, like ConnectingArrowProps. This makes the component signature cleaner and easier to extend in the future.

Example:

type ConnectingArrowProps = {
  position: "left" | "right";
};

function ConnectingArrow({ position }: ConnectingArrowProps) { /* ... */ }

}

function ConnectingArrow({ position }: { position: "left" | "right" }) {
const left = position === "left" ? "calc(33.333% - 10px)" : "calc(66.666% - 10px)";
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To improve readability and maintainability, it's better to make the calculation for the left property more explicit. Using division (100% / 3) instead of a magic number like 33.333% clarifies the intent of dividing the container into three parts.

Suggested change
const left = position === "left" ? "calc(33.333% - 10px)" : "calc(66.666% - 10px)";
const left = position === "left" ? "calc((100% / 3) - 10px)" : "calc((100% / 3) * 2 - 10px)";

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/dashboard/src/components/landing/how-it-works.tsx`:
- Around line 55-60: The SVG uses viewBox="0 0 60 20" but is rendered with
className "w-5 h-5" causing a 3:1->1:1 distortion; fix by making the SVG
coordinate system match its rendered aspect ratio—either change the viewBox to a
square like "0 0 20 20" and adjust the path coordinates accordingly, or change
the CSS sizing (the "w-5 h-5" classes) to preserve the 3:1 ratio (e.g., a wider
width with the same height) so the SVG in the component (the <svg ...
className="hidden sm:block absolute top-1/2 -translate-y-1/2 w-5 h-5" ...>)
displays without squashing. Ensure the path data is updated if you alter the
viewBox.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a9f13ed0-a611-4b7f-a8cb-66c95917c54d

📥 Commits

Reviewing files that changed from the base of the PR and between 93bb4c5 and 9bc26f0.

📒 Files selected for processing (2)
  • packages/dashboard/src/app/page.tsx
  • packages/dashboard/src/components/landing/how-it-works.tsx

Comment on lines +55 to +60
<svg
role="presentation"
aria-hidden="true"
className="hidden sm:block absolute top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"
style={{ left }}
viewBox="0 0 60 20"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

SVG aspect ratio mismatch causes visual distortion.

The viewBox="0 0 60 20" has a 3:1 aspect ratio, but the element uses w-5 h-5 (1:1 aspect ratio). This compresses the 60-unit-wide path into a 20px square, making the arrow appear squashed rather than as a proper horizontal connector.

Consider aligning the viewBox and element dimensions:

🔧 Proposed fix
     <svg
       role="presentation"
       aria-hidden="true"
-      className="hidden sm:block absolute top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"
+      className="hidden sm:block absolute top-1/2 -translate-y-1/2 w-[60px] h-5 text-muted-foreground"
       style={{ left }}
       viewBox="0 0 60 20"
       fill="none"
     >

Or adjust the viewBox to match a square aspect ratio and update the path accordingly.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<svg
role="presentation"
aria-hidden="true"
className="hidden sm:block absolute top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"
style={{ left }}
viewBox="0 0 60 20"
<svg
role="presentation"
aria-hidden="true"
className="hidden sm:block absolute top-1/2 -translate-y-1/2 w-[60px] h-5 text-muted-foreground"
style={{ left }}
viewBox="0 0 60 20"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/dashboard/src/components/landing/how-it-works.tsx` around lines 55 -
60, The SVG uses viewBox="0 0 60 20" but is rendered with className "w-5 h-5"
causing a 3:1->1:1 distortion; fix by making the SVG coordinate system match its
rendered aspect ratio—either change the viewBox to a square like "0 0 20 20" and
adjust the path coordinates accordingly, or change the CSS sizing (the "w-5 h-5"
classes) to preserve the 3:1 ratio (e.g., a wider width with the same height) so
the SVG in the component (the <svg ... className="hidden sm:block absolute
top-1/2 -translate-y-1/2 w-5 h-5" ...>) displays without squashing. Ensure the
path data is updated if you alter the viewBox.

@duyet duyet merged commit 04ef3a9 into main Mar 17, 2026
4 checks passed
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