Skip to content

update website hero#459

Merged
Kitenite merged 16 commits intomainfrom
marketing-site
Dec 22, 2025
Merged

update website hero#459
Kitenite merged 16 commits intomainfrom
marketing-site

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented Dec 21, 2025

Description

Related Issues

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactor
  • Other (please describe):

Testing

Screenshots (if applicable)

Additional Notes

Summary by CodeRabbit

  • New Features
    • Animated grid background added to hero.
    • Interactive product demo gallery with selectable video demos and animated gradients.
    • Video demo player that auto-controls playback when active.
  • Enhancements
    • Typewriter cursor updated to a styled block with improved fade animation.
  • Style
    • Updated hero title and supporting copy.
    • Refined macOS download button label.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 21, 2025

Walkthrough

Refactors the HeroSection by extracting GridBackground and ProductDemo (with SelectorPill, MeshGradient, DemoVideo) into separate client components, updates hero copy and spacing, refines TypewriterText cursor animation, adds stripe-gradient types and dependency, and removes inline demo/grid implementations.

Changes

Cohort / File(s) Summary
HeroSection core
apps/marketing/src/app/components/HeroSection/HeroSection.tsx
Replaced inline grid and demo render with imports of GridBackground and ProductDemo; updated heading and description text; increased layout gaps.
Typewriter cursor
apps/marketing/src/app/components/HeroSection/components/TypewriterText/TypewriterText.tsx
Replaced blinking text cursor with a styled block cursor that changes opacity when typing completes; preserves typing logic.
GridBackground component
apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx, apps/marketing/src/app/components/HeroSection/components/GridBackground/index.ts
New client component rendering an SVG grid backdrop with a Framer Motion fade-in; added re-export barrel.
ProductDemo and selectors
apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx, apps/marketing/src/app/components/HeroSection/components/ProductDemo/index.ts, apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx, apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/index.ts
New ProductDemo gallery rendering selectable demo videos; SelectorPill motion button to switch demos; added re-export barrels.
Demo video
apps/marketing/src/app/components/HeroSection/components/DemoVideo/DemoVideo.tsx, apps/marketing/src/app/components/HeroSection/components/DemoVideo/index.ts
New DemoVideo component that plays/pauses and rewinds a video based on isActive prop; added re-export barrel.
MeshGradient canvas
apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/MeshGradient/MeshGradient.tsx, apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/MeshGradient/index.ts
New MeshGradient component that dynamically imports stripe-gradient, initializes a canvas gradient, and cleans up on unmount; added re-export barrel.
Demo constants & mappings
apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts
Added DemoOption interface, DEMO_OPTIONS, SELECTOR_OPTIONS, and DEMO_VIDEOS mapping for demo configuration.
stripe-gradient types & dependency
apps/marketing/src/types/stripe-gradient.d.ts, apps/marketing/package.json
Added ambient TypeScript declarations for stripe-gradient (Gradient, MiniGl) and added dependency "stripe-gradient": "^1.0.1" to apps/marketing.
UI copy small change
apps/web/src/app/page.tsx
Updated macOS download label from "Download for macOS" to "Download for Mac."
Agent binary validation removal
apps/desktop/src/main/lib/agent-setup/utils.ts
Removed runtime validation check for binary names inside findRealBinary.
Test comment tweak
apps/desktop/src/main/lib/sanitize/sanitize.test.ts
Minor comment/lint directive wording change only.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant User
participant ProductDemo
participant SelectorPill
participant DemoVideo
participant MeshGradient
Note over ProductDemo,MeshGradient: Mounted as client components
User->>SelectorPill: click(label)
SelectorPill->>ProductDemo: onClick(label)
ProductDemo->>MeshGradient: update active colors
ProductDemo->>DemoVideo: set isActive for selected video
DemoVideo->>DemoVideo: rewind & play if isActive; pause otherwise

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Verify video lifecycle in DemoVideo (rewind/play/pause behavior and promise handling).
  • Inspect MeshGradient dynamic import, initialization, and cleanup to prevent leaks.
  • Confirm ProductDemo state transitions and animation layering (cross-fades).
  • Ensure new dependency and ambient types align with the actual stripe-gradient API.

Possibly related PRs

Poem

🐰 I hopped through code with nimble feet,

Pulled demos out and made them neat,
Gradients shimmer, videos play,
Pills choose scenes in a joyful way,
A tiny hop for frontend feat.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description contains only the template placeholders with no actual content; all required sections are empty or unfilled. Fill in the Description section with details about the component refactoring, list related issues if any, select the appropriate Type of Change (appears to be Refactor), describe testing steps, and add any relevant context.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'update website hero' is too vague and generic; it lacks specificity about what aspect of the hero section was updated. Consider revising the title to be more specific, such as 'Refactor HeroSection with GridBackground and ProductDemo components' or 'Update HeroSection layout and heading text'.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch marketing-site

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
Contributor

@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: 0

🧹 Nitpick comments (2)
apps/marketing/src/app/components/HeroSection/HeroSection.tsx (2)

148-152: Consider removing loadedGifs from the dependency array.

Including loadedGifs in deps causes the effect to re-run after each update. Use the functional update pattern to check previous state instead:

🔎 Suggested optimization
 useEffect(() => {
-  if (!loadedGifs.has(activeOption)) {
-    setLoadedGifs((prev) => new Set([...prev, activeOption]));
-  }
-}, [activeOption, loadedGifs]);
+  setLoadedGifs((prev) => {
+    if (prev.has(activeOption)) return prev;
+    return new Set([...prev, activeOption]);
+  });
+}, [activeOption]);

141-227: Consider extracting ProductDemo and SelectorPill into separate files.

As per the coding guidelines, each component should be in its own file. Since these are only used within HeroSection, they could be organized as:

HeroSection/
├── HeroSection.tsx
├── index.ts
└── components/
    ├── ProductDemo/
    │   ├── ProductDemo.tsx
    │   ├── index.ts
    │   └── components/
    │       └── SelectorPill/
    │           ├── SelectorPill.tsx
    │           └── index.ts

Based on coding guidelines: "Use one component per file - do not combine multiple components in a single file."

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4457d7e and 450111b.

📒 Files selected for processing (3)
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx (4 hunks)
  • apps/marketing/src/app/components/HeroSection/components/TypewriterText/TypewriterText.tsx (1 hunks)
  • apps/web/src/app/page.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Avoid using any type in TypeScript - maintain type safety unless absolutely necessary

Files:

  • apps/web/src/app/page.tsx
  • apps/marketing/src/app/components/HeroSection/components/TypewriterText/TypewriterText.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Run Biome for formatting, linting, import organization, and safe fixes at the root level using bun run lint:fix

Files:

  • apps/web/src/app/page.tsx
  • apps/marketing/src/app/components/HeroSection/components/TypewriterText/TypewriterText.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
**/*.{tsx,css}

📄 CodeRabbit inference engine (AGENTS.md)

Use React + TailwindCSS v4 + shadcn/ui for UI development

Files:

  • apps/web/src/app/page.tsx
  • apps/marketing/src/app/components/HeroSection/components/TypewriterText/TypewriterText.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
**/{components,features}/**/[!.]*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Organize project structure with one folder per component: ComponentName/ComponentName.tsx with index.ts barrel export

Files:

  • apps/marketing/src/app/components/HeroSection/components/TypewriterText/TypewriterText.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
**/{components,features}/**/*.{ts,tsx,test.ts,test.tsx,stories.tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Co-locate component dependencies (utils, hooks, constants, config, tests, stories) next to the file using them

Files:

  • apps/marketing/src/app/components/HeroSection/components/TypewriterText/TypewriterText.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
**/{components,features}/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

**/{components,features}/**/*.tsx: Nest components in parent's components/ folder if used only once, promote to highest shared parent's components/ if used 2+ times
Use one component per file - do not combine multiple components in a single file

Files:

  • apps/marketing/src/app/components/HeroSection/components/TypewriterText/TypewriterText.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
🧬 Code graph analysis (1)
apps/marketing/src/app/components/HeroSection/HeroSection.tsx (1)
packages/ui/src/components/ai-elements/image.tsx (1)
  • Image (9-24)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Deploy API
  • GitHub Check: Deploy Web
  • GitHub Check: Deploy Marketing
  • GitHub Check: Deploy Admin
  • GitHub Check: Deploy Docs
  • GitHub Check: Build
🔇 Additional comments (4)
apps/web/src/app/page.tsx (1)

93-93: LGTM!

The simplified text "Download for Mac" is clear and commonly used terminology.

apps/marketing/src/app/components/HeroSection/components/TypewriterText/TypewriterText.tsx (1)

46-67: LGTM!

The isTypingComplete flag cleanly separates typing state from completion state. The cursor animation using times: [0, 0.5, 0.5, 1] creates a crisp 50/50 blink pattern with instant transitions—a nice improvement over a smoother fade that might look sluggish for a cursor.

apps/marketing/src/app/components/HeroSection/HeroSection.tsx (2)

67-90: LGTM!

The increased grid gaps and updated hero copy read well. The tagline is concise and effectively communicates the product's value proposition.


154-196: LGTM!

The refactored ProductDemo has a clean structure—lazy-loaded GIF layers with opacity transitions and selector pills positioned outside the image area. The object-contain approach preserves aspect ratio well.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 21, 2025

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

Service Status
Neon Database (Neon)

Thank you for your contribution! 🎉


Preview resources have been processed for cleanup

Copy link
Copy Markdown
Contributor

@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

🧹 Nitpick comments (4)
apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx (1)

13-46: Consider adding accessibility labels for the demo controls.

The product demo section lacks accessible labels for screen reader users. The video container and selector pills should provide context about the currently active demo option.

🔎 Suggested accessibility improvements
 return (
-  <div className="relative w-full flex flex-col gap-3">
+  <div className="relative w-full flex flex-col gap-3" role="region" aria-label="Product demo">
     <div
       className="relative w-full rounded-lg overflow-hidden"
       style={{ aspectRatio: "1728/1080" }}
+      aria-live="polite"
+      aria-label={`Currently showing: ${activeOption}`}
     >

Also consider adding aria-pressed={active} to the SelectorPill component to indicate the active state to screen readers.

apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx (2)

11-37: Add ARIA attributes for better accessibility.

The button should indicate its active/selected state to assistive technologies using aria-pressed or aria-current.

🔎 Suggested accessibility improvement
 return (
   <motion.button
     type="button"
     onClick={onClick}
+    aria-pressed={active}
     className={`
       inline-flex items-center justify-center py-2 text-sm whitespace-nowrap cursor-pointer

28-32: Animating padding may cause layout shifts.

The paddingLeft and paddingRight animation creates a smooth transition but may cause neighboring pills to shift position when a pill is activated. Consider whether this is the desired UX or if a different approach (e.g., scale transform) might provide a smoother experience.

apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts (1)

25-31: Remove redundant derived constants and type assertions.

SELECTOR_OPTIONS and DEMO_VIDEOS are unused derived constants that add maintenance burden without providing value. The component already uses DEMO_OPTIONS directly, as shown in ProductDemo.tsx:

  • For selector labels: DEMO_OPTIONS.map(opt => opt.label) (line 35)
  • For video lookup: option.videoPath direct access (line 23)

The type assertions (as readonly string[] and as Record<string, string>) are also redundant—TypeScript infers these types automatically. Removing both constants simplifies the code and maintains a single source of truth in DEMO_OPTIONS.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 450111b and 342b44c.

⛔ Files ignored due to path filters (9)
  • apps/marketing/public/hero/agents.mp4 is excluded by !**/*.mp4
  • apps/marketing/public/hero/change-themes.gif is excluded by !**/*.gif
  • apps/marketing/public/hero/changes.mp4 is excluded by !**/*.mp4
  • apps/marketing/public/hero/manage-terminals.gif is excluded by !**/*.gif
  • apps/marketing/public/hero/open-in.mp4 is excluded by !**/*.mp4
  • apps/marketing/public/hero/open-worktrees.gif is excluded by !**/*.gif
  • apps/marketing/public/hero/tabs.mp4 is excluded by !**/*.mp4
  • apps/marketing/public/hero/use-agents.gif is excluded by !**/*.gif
  • apps/marketing/public/hero/worktrees.mp4 is excluded by !**/*.mp4
📒 Files selected for processing (8)
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx (2 hunks)
  • apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx (1 hunks)
  • apps/marketing/src/app/components/HeroSection/components/GridBackground/index.ts (1 hunks)
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx (1 hunks)
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx (1 hunks)
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/index.ts (1 hunks)
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts (1 hunks)
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/index.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Avoid using any type in TypeScript - maintain type safety unless absolutely necessary

Files:

  • apps/marketing/src/app/components/HeroSection/components/GridBackground/index.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/index.ts
  • apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/index.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Run Biome for formatting, linting, import organization, and safe fixes at the root level using bun run lint:fix

Files:

  • apps/marketing/src/app/components/HeroSection/components/GridBackground/index.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/index.ts
  • apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/index.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
**/{components,features}/**/*.{ts,tsx,test.ts,test.tsx,stories.tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Co-locate component dependencies (utils, hooks, constants, config, tests, stories) next to the file using them

Files:

  • apps/marketing/src/app/components/HeroSection/components/GridBackground/index.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/index.ts
  • apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/index.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
**/{components,features}/**/[!.]*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Organize project structure with one folder per component: ComponentName/ComponentName.tsx with index.ts barrel export

Files:

  • apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
**/*.{tsx,css}

📄 CodeRabbit inference engine (AGENTS.md)

Use React + TailwindCSS v4 + shadcn/ui for UI development

Files:

  • apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
**/{components,features}/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

**/{components,features}/**/*.tsx: Nest components in parent's components/ folder if used only once, promote to highest shared parent's components/ if used 2+ times
Use one component per file - do not combine multiple components in a single file

Files:

  • apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
🧠 Learnings (1)
📚 Learning: 2025-12-18T23:19:10.405Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-18T23:19:10.405Z
Learning: Applies to **/{components,features}/**/[!.]*.tsx : Organize project structure with one folder per component: ComponentName/ComponentName.tsx with index.ts barrel export

Applied to files:

  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/index.ts
🧬 Code graph analysis (1)
apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx (1)
apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/index.ts (1)
  • SelectorPill (1-1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Deploy API
  • GitHub Check: Deploy Admin
  • GitHub Check: Deploy Web
  • GitHub Check: Deploy Marketing
  • GitHub Check: Deploy Docs
  • GitHub Check: Deploy Database (Neon)
  • GitHub Check: Build
  • GitHub Check: Lint
🔇 Additional comments (5)
apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx (1)

1-54: LGTM! Clean animated background implementation.

The GridBackground component is well-structured with proper accessibility attributes (aria-hidden="true" and SVG <title>), smooth Framer Motion fade-in animation, and clean SVG pattern/mask definitions.

apps/marketing/src/app/components/HeroSection/components/GridBackground/index.ts (1)

1-1: LGTM! Follows component structure guidelines.

Proper barrel export pattern as specified in coding guidelines.

apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/index.ts (1)

1-1: LGTM! Follows component structure guidelines.

Proper barrel export pattern aligning with the project's component organization standard.

Based on learnings, this follows the guideline: "Organize project structure with one folder per component: ComponentName/ComponentName.tsx with index.ts barrel export".

apps/marketing/src/app/components/HeroSection/components/ProductDemo/index.ts (1)

1-1: LGTM! Follows component structure guidelines.

Proper barrel export pattern consistent with project structure.

apps/marketing/src/app/components/HeroSection/HeroSection.tsx (1)

1-79: LGTM! Clean refactor with improved component composition.

The HeroSection has been successfully refactored to:

  • Use the new GridBackground component for the animated backdrop
  • Integrate the new ProductDemo component with video showcase
  • Update hero copy to better reflect the product positioning
  • Maintain proper animation timing and layout structure

The changes improve code organization by extracting complex demo logic into dedicated components.

Copy link
Copy Markdown
Contributor

@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: 0

♻️ Duplicate comments (1)
apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx (1)

57-67: Add error handling for video playback.

The video.play() call on line 63 returns a Promise that can reject due to browser autoplay policies, causing unhandled promise rejection warnings.

🔎 Proposed fix
 useEffect(() => {
   const video = videoRef.current;
   if (!video) return;

   if (isActive) {
     video.currentTime = 0;
-    video.play();
+    video.play().catch((error) => {
+      // Silently handle autoplay policy restrictions
+      console.debug('Video autoplay prevented:', error);
+    });
   } else {
     video.pause();
   }
 }, [isActive]);
🧹 Nitpick comments (3)
apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx (1)

17-35: Consider adding aria-pressed for better accessibility.

The button functions as a toggle control showing active/inactive states. Adding aria-pressed={active} would improve screen reader support by explicitly conveying the button's pressed state.

🔎 Proposed enhancement
 <motion.button
   type="button"
+  aria-pressed={active}
   onClick={onClick}
   className={`
apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx (1)

20-49: Consider using unique IDs to prevent potential conflicts.

The hardcoded SVG IDs (hero-grid, grid-fade, grid-mask) could cause rendering issues if multiple GridBackground instances are rendered on the same page. While the current usage appears to be single-instance, using useId() or a unique prefix would make the component more resilient.

🔎 Proposed enhancement with useId()
+"use client";
+
 import { motion } from "framer-motion";
+import { useId } from "react";

 export function GridBackground() {
+  const id = useId();
+  const gridId = `hero-grid-${id}`;
+  const fadeId = `grid-fade-${id}`;
+  const maskId = `grid-mask-${id}`;
+
   return (
     <motion.div
       ...
       <svg ...>
         <title>grid</title>
         <defs>
           <pattern
-            id="hero-grid"
+            id={gridId}
             ...
           >
             ...
           </pattern>
-          <radialGradient id="grid-fade" ...>
+          <radialGradient id={fadeId} ...>
             ...
           </radialGradient>
-          <mask id="grid-mask">
-            <rect width="100%" height="100%" fill="url(#grid-fade)" />
+          <mask id={maskId}>
+            <rect width="100%" height="100%" fill={`url(#${fadeId})`} />
           </mask>
         </defs>
         <rect
           ...
-          fill="url(#hero-grid)"
-          mask="url(#grid-mask)"
+          fill={`url(#${gridId})`}
+          mask={`url(#${maskId})`}
         />
       </svg>
     </motion.div>
   );
 }
apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts (1)

25-31: Remove redundant type assertions.

The explicit type assertions on lines 27 and 31 are unnecessary as TypeScript correctly infers these types from the operations.

🔎 Simplified version
 export const SELECTOR_OPTIONS = DEMO_OPTIONS.map(
   (option) => option.label,
-) as readonly string[];
+);

 export const DEMO_VIDEOS: Record<string, string> = Object.fromEntries(
   DEMO_OPTIONS.map((option) => [option.label, option.videoPath]),
-) as Record<string, string>;
+);
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 450111b and 99ce46d.

⛔ Files ignored due to path filters (9)
  • apps/marketing/public/hero/agents.mp4 is excluded by !**/*.mp4
  • apps/marketing/public/hero/change-themes.gif is excluded by !**/*.gif
  • apps/marketing/public/hero/changes.mp4 is excluded by !**/*.mp4
  • apps/marketing/public/hero/manage-terminals.gif is excluded by !**/*.gif
  • apps/marketing/public/hero/open-in.mp4 is excluded by !**/*.mp4
  • apps/marketing/public/hero/open-worktrees.gif is excluded by !**/*.gif
  • apps/marketing/public/hero/tabs.mp4 is excluded by !**/*.mp4
  • apps/marketing/public/hero/use-agents.gif is excluded by !**/*.gif
  • apps/marketing/public/hero/worktrees.mp4 is excluded by !**/*.mp4
📒 Files selected for processing (8)
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
  • apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx
  • apps/marketing/src/app/components/HeroSection/components/GridBackground/index.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/index.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/index.ts
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Avoid using any type in TypeScript - maintain type safety unless absolutely necessary

Files:

  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/index.ts
  • apps/marketing/src/app/components/HeroSection/components/GridBackground/index.ts
  • apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/index.ts
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Run Biome for formatting, linting, import organization, and safe fixes at the root level using bun run lint:fix

Files:

  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/index.ts
  • apps/marketing/src/app/components/HeroSection/components/GridBackground/index.ts
  • apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/index.ts
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx
**/{components,features}/**/*.{ts,tsx,test.ts,test.tsx,stories.tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Co-locate component dependencies (utils, hooks, constants, config, tests, stories) next to the file using them

Files:

  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/index.ts
  • apps/marketing/src/app/components/HeroSection/components/GridBackground/index.ts
  • apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/index.ts
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx
**/{components,features}/**/[!.]*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Organize project structure with one folder per component: ComponentName/ComponentName.tsx with index.ts barrel export

Files:

  • apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx
**/*.{tsx,css}

📄 CodeRabbit inference engine (AGENTS.md)

Use React + TailwindCSS v4 + shadcn/ui for UI development

Files:

  • apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx
**/{components,features}/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

**/{components,features}/**/*.tsx: Nest components in parent's components/ folder if used only once, promote to highest shared parent's components/ if used 2+ times
Use one component per file - do not combine multiple components in a single file

Files:

  • apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx
🧠 Learnings (1)
📚 Learning: 2025-12-18T23:19:10.415Z
Learnt from: CR
Repo: superset-sh/superset PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-18T23:19:10.415Z
Learning: Applies to **/{components,features}/**/[!.]*.tsx : Organize project structure with one folder per component: ComponentName/ComponentName.tsx with index.ts barrel export

Applied to files:

  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/index.ts
  • apps/marketing/src/app/components/HeroSection/components/GridBackground/index.ts
🧬 Code graph analysis (3)
apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx (1)
apps/marketing/src/app/components/HeroSection/components/GridBackground/index.ts (1)
  • GridBackground (1-1)
apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx (1)
apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/index.ts (1)
  • SelectorPill (1-1)
apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx (2)
apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts (1)
  • DEMO_OPTIONS (6-23)
apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/SelectorPill.tsx (1)
  • SelectorPill (11-37)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Deploy Admin
  • GitHub Check: Deploy API
  • GitHub Check: Deploy Docs
  • GitHub Check: Deploy Web
  • GitHub Check: Deploy Marketing
  • GitHub Check: Build
🔇 Additional comments (12)
apps/marketing/src/app/components/HeroSection/components/GridBackground/index.ts (1)

1-1: LGTM!

Clean barrel export following the project's component organization pattern.

apps/marketing/src/app/components/HeroSection/components/ProductDemo/index.ts (1)

1-1: LGTM!

Consistent barrel export pattern for the ProductDemo component.

apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/SelectorPill/index.ts (1)

1-1: LGTM!

Proper barrel export for the SelectorPill component.

apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx (1)

5-12: LGTM!

Clean component structure with appropriate fade-in animation and pointer-events-none to ensure the background doesn't interfere with user interactions.

apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts (1)

1-23: LGTM!

Clean interface and configuration structure with appropriate as const assertion for immutability.

apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx (3)

8-47: LGTM!

Well-structured component with safe state initialization, proper aspect ratio handling, and smooth cross-fade animations between demo videos.


49-56: LGTM!

Clean component structure with proper TypeScript interface and video ref setup.


69-78: LGTM!

Properly configured video element with muted and playsInline attributes to improve autoplay compatibility, and appropriate styling for the container.

apps/marketing/src/app/components/HeroSection/HeroSection.tsx (4)

3-11: LGTM!

Clean imports with proper removal of unused dependencies and addition of the new extracted components.


18-22: LGTM!

Good use of the extracted GridBackground component and well-structured responsive grid layout with improved spacing.


29-43: LGTM!

Clear and concise hero copy that effectively communicates the product's value proposition.


62-69: LGTM!

Clean integration of the extracted ProductDemo component with appropriate entrance animation.

Copy link
Copy Markdown
Contributor

@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: 0

🧹 Nitpick comments (1)
apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts (1)

30-36: Consider removing redundant type assertions.

The explicit type assertions as readonly string[] (line 32) and as Record<string, string> (line 36) are redundant since TypeScript can infer these types correctly:

  • Array.map() already returns string[] for the label mapping
  • Object.fromEntries() already returns Record<string, string> for the entries mapping
🔎 Proposed refactoring to remove redundant assertions
 export const SELECTOR_OPTIONS = DEMO_OPTIONS.map(
 	(option) => option.label,
-) as readonly string[];
+);
 
 export const DEMO_VIDEOS: Record<string, string> = Object.fromEntries(
 	DEMO_OPTIONS.map((option) => [option.label, option.videoPath]),
-) as Record<string, string>;
+);
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 914e3ad and ee26dac.

📒 Files selected for processing (9)
  • apps/desktop/src/main/lib/agent-setup/utils.ts
  • apps/desktop/src/main/lib/sanitize/sanitize.test.ts
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/DemoVideo/DemoVideo.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/DemoVideo/index.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/MeshGradient/MeshGradient.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts
  • apps/marketing/src/types/stripe-gradient.d.ts
💤 Files with no reviewable changes (1)
  • apps/desktop/src/main/lib/agent-setup/utils.ts
✅ Files skipped from review due to trivial changes (1)
  • apps/desktop/src/main/lib/sanitize/sanitize.test.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/MeshGradient/MeshGradient.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/ProductDemo.tsx
  • apps/marketing/src/types/stripe-gradient.d.ts
🧰 Additional context used
📓 Path-based instructions (6)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Avoid using any type in TypeScript - maintain type safety unless absolutely necessary

Files:

  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/DemoVideo/index.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/DemoVideo/DemoVideo.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Run Biome for formatting, linting, import organization, and safe fixes at the root level using bun run lint:fix

Files:

  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/DemoVideo/index.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/DemoVideo/DemoVideo.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts
**/{components,features}/**/*.{ts,tsx,test.ts,test.tsx,stories.tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Co-locate component dependencies (utils, hooks, constants, config, tests, stories) next to the file using them

Files:

  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/DemoVideo/index.ts
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/DemoVideo/DemoVideo.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts
**/{components,features}/**/[!.]*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Organize project structure with one folder per component: ComponentName/ComponentName.tsx with index.ts barrel export

Files:

  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/DemoVideo/DemoVideo.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
**/*.{tsx,css}

📄 CodeRabbit inference engine (AGENTS.md)

Use React + TailwindCSS v4 + shadcn/ui for UI development

Files:

  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/DemoVideo/DemoVideo.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
**/{components,features}/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

**/{components,features}/**/*.tsx: Nest components in parent's components/ folder if used only once, promote to highest shared parent's components/ if used 2+ times
Use one component per file - do not combine multiple components in a single file

Files:

  • apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/DemoVideo/DemoVideo.tsx
  • apps/marketing/src/app/components/HeroSection/HeroSection.tsx
🧬 Code graph analysis (2)
apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/DemoVideo/DemoVideo.tsx (1)
apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/DemoVideo/index.ts (1)
  • DemoVideo (1-1)
apps/marketing/src/app/components/HeroSection/HeroSection.tsx (2)
apps/marketing/src/app/components/HeroSection/components/GridBackground/GridBackground.tsx (1)
  • GridBackground (5-54)
apps/marketing/src/app/components/HeroSection/components/TypewriterText/TypewriterText.tsx (1)
  • TypewriterText (15-71)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Deploy Marketing
  • GitHub Check: Deploy Docs
  • GitHub Check: Deploy Web
  • GitHub Check: Deploy API
  • GitHub Check: Deploy Admin
  • GitHub Check: Build
🔇 Additional comments (9)
apps/marketing/src/app/components/HeroSection/HeroSection.tsx (3)

5-11: LGTM! Clean component extraction.

The refactoring successfully extracts GridBackground and ProductDemo into separate components, following the project's component organization guidelines. The import changes correctly remove unused dependencies and add the new component imports.


22-22: Verify spacing impact on responsive layouts.

The grid gap has been increased from gap-8 to gap-12 and lg:gap-12 to lg:gap-16. While this appears intentional, ensure the increased spacing doesn't cause layout issues on edge-case screen sizes between mobile and desktop breakpoints.


35-42: Content updates look good.

The hero text has been updated to be more concise and generalized. The new copy is clearer and more professional.

apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/DemoVideo/index.ts (1)

1-1: LGTM! Standard barrel export pattern.

The barrel export follows the project's convention for component organization.

apps/marketing/src/app/components/HeroSection/components/ProductDemo/components/DemoVideo/DemoVideo.tsx (3)

5-8: LGTM! Clean and type-safe interface.

The interface is well-defined with appropriate types for the component props.


13-25: LGTM! Correct video playback control logic.

The useEffect correctly handles video playback based on the isActive state:

  • Rewinds to the start and plays when active
  • Pauses when inactive
  • Silently catches autoplay restrictions, which is the expected behavior

27-36: Component nesting follows project structure guidelines correctly.

DemoVideo is used only by ProductDemo and is properly nested under ProductDemo/components/. The folder structure adheres to guidelines with DemoVideo.tsx and an index.ts barrel export. The video element configuration with loop, muted, and playsInline attributes is also correct.

apps/marketing/src/app/components/HeroSection/components/ProductDemo/constants.ts (2)

1-5: LGTM! Well-structured type definition.

The DemoOption interface is clearly defined with appropriate types, including a readonly tuple for colors ensuring immutability.


7-28: LGTM! Clean constant definition following DRY principles.

The DEMO_OPTIONS constant is well-structured with as const ensuring type narrowing and immutability. The configuration is clear and maintainable.

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.

1 participant