Skip to content

feat(docs): randomize hero terminal demo across integrations#263

Merged
rubenmarcus merged 2 commits into
mainfrom
feat/hero-randomization
Apr 8, 2026
Merged

feat(docs): randomize hero terminal demo across integrations#263
rubenmarcus merged 2 commits into
mainfrom
feat/hero-randomization

Conversation

@rubenmarcus
Copy link
Copy Markdown
Member

Summary

  • Hero section now randomly shows one of 4 integration workflows (Figma, GitHub, Linear, Notion) on each page load
  • Each scenario has its own tagline, subtitle, terminal demo, and highlighted integration logo
  • Figma remains the SSR default (safe for crawlers/SEO)
  • Layout description updated to be integration-neutral

Test plan

  • Reload homepage multiple times — different terminal demos appear
  • Each scenario shows correct tagline, command, and output
  • Active integration logo is highlighted (not grayscale)
  • Mobile/tablet responsive layout preserved
  • pnpm build in docs/ passes

🤖 Generated with Claude Code

The hero section now randomly shows one of four integration workflows
(Figma, GitHub, Linear, Notion) on each page load, with matching
taglines and highlighted integration logos. Figma is the SSR default.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

Issue Linking Reminder

This PR doesn't appear to have a linked issue. Consider linking to:

  • This repo: Closes #123
  • ralph-ideas: Closes multivmlabs/ralph-ideas#123

Using Closes, Fixes, or Resolves will auto-close the issue when this PR is merged.


If this PR doesn't need an issue, you can ignore this message.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Mar 6, 2026

Greptile Summary

This PR makes the hero section's terminal demo dynamic: on each client-side page load one of four integration scenarios (Figma, GitHub, Linear, Notion) is randomly selected, updating the tagline, subtitle, command output, and the highlighted integration logo. Figma remains the SSR default (index 0), keeping the crawlable HTML stable for SEO.

The approach is clean and low-risk for the HeroSection itself, but the index.tsx page file introduces three new component imports (FigmaShowcase, VisualValidation, AgentEcosystem) that do not exist in the repository, which will cause the pnpm build to fail.

Key observations:

  • Build-breaking: FigmaShowcase, VisualValidation, and AgentEcosystem are imported in docs/src/pages/index.tsx but have no corresponding component files — the documented test plan step pnpm build in docs/ passes will not pass.
  • Convention: DemoScenario is declared as an interface but the project convention prefers type for plain data structures without inheritance.
  • Effect cleanup: Math.random() selection and the visibility timer share a single useEffect; only the timer is cleaned up on unmount. Splitting into two effects would be safer.
  • CSS change: The .integrationLogoActive selector is correctly added alongside :hover to highlight the active logo — straightforward and correct.

Confidence Score: 2/5

  • Not safe to merge — three missing component files will cause a build failure.
  • The HeroSection changes themselves are solid and low-risk. However, docs/src/pages/index.tsx imports FigmaShowcase, VisualValidation, and AgentEcosystem which do not exist anywhere in the repository. This is a hard build error that will fail pnpm build in docs/, directly contradicting the PR's own test plan. The score is kept at 2 rather than 0 because the core hero randomisation logic is correct and the missing components may simply be omitted from the PR by mistake.
  • docs/src/pages/index.tsx — imports three components that do not exist; docs/src/components/HeroSection/index.tsx — minor style and effect-cleanup issues.

Important Files Changed

Filename Overview
docs/src/components/HeroSection/index.tsx Core change: adds 4 DemoScenario data objects and randomises the active scenario client-side via useEffect. Minor issues: interface should be type per project convention; Math.random() and the visibility timer share one effect (only the timer is cleaned up); array-index keys used for output lines.
docs/src/components/HeroSection/styles.module.css Minimal CSS change: adds .integrationLogoActive alongside the existing :hover rule so the active integration logo is shown in full colour. Clean and correct.
docs/src/pages/index.tsx Adds FigmaShowcase, VisualValidation, and AgentEcosystem components; removes ClientShowcase and LLMProviders; reorders the section sequence. The diff itself is safe, but several of the newly imported components are not in the PR changeset — their existence should be verified before merge.

Sequence Diagram

sequenceDiagram
    participant SSR as SSR / Crawler
    participant Browser as Browser (Client)
    participant HeroSection as HeroSection Component

    SSR->>HeroSection: Render (scenarioIndex = 0 → Figma)
    HeroSection-->>SSR: Static HTML with Figma tagline/terminal

    Browser->>HeroSection: Hydrate
    HeroSection->>HeroSection: useEffect fires
    HeroSection->>HeroSection: setScenarioIndex(Math.random() * 4)
    HeroSection->>HeroSection: setTimeout → setIsVisible(true)
    HeroSection-->>Browser: Re-render with random scenario (Figma/GitHub/Linear/Notion)
    HeroSection-->>Browser: Highlight active integration logo (integrationLogoActive)
Loading

Last reviewed commit: a24245d

Comment thread docs/src/components/HeroSection/index.tsx
Comment thread docs/src/components/HeroSection/index.tsx
Comment thread docs/src/components/HeroSection/index.tsx
Comment thread docs/src/pages/index.tsx Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a24245d22c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/src/pages/index.tsx Outdated
Comment thread docs/src/components/HeroSection/index.tsx
The index.tsx referenced FigmaShowcase, VisualValidation, and
AgentEcosystem components that were never created. Restored the
original ClientShowcase and LLMProviders components that exist.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

This PR has been automatically marked as stale because it has not had recent activity.
It will be closed in 7 days if no further activity occurs.
Please update or comment if this PR is still in progress.

@github-actions github-actions Bot added the stale label Apr 8, 2026
@rubenmarcus rubenmarcus merged commit 460270a into main Apr 8, 2026
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant