Skip to content

feat(www): use-case videos on the homepage and every For page - #2435

Merged
MODSetter merged 2 commits into
devfrom
feat/use-case-videos
Nov 10, 2026
Merged

MODSetter merged 2 commits into
devfrom
feat/use-case-videos

Conversation

@MODSetter

@MODSetter MODSetter commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

What

The guides' videos on the pages where visitors decide to download, each with a basic guide beside it.

  • Homepage: a "See it work" band under the logos, with a tab per use case: Ask your files, Write a report, Flashcards and quizzes, Make a podcast, Redline a contract, Answer a questionnaire. Each video sits beside three steps and a link to its full guide, then Download for desktop.
  • Lawyers, accountants, students, teachers and business: the same band under the hero, with the three or four videos that page sells (lawyers: ask, make a document, redline; accountants: ask, analyse a spreadsheet, write a report, questionnaire; students: flashcards and quizzes, podcast, transcribe a recording; teachers: flashcards and quizzes, make a document, podcast; business: write a report, make a document, analyse a spreadsheet, control what's sent).
  • Contract redline, security questionnaire, study guide maker, flashcard, quiz and podcast generators: their guide's video above their "How it works" steps, with the download and the full guide after the steps.

How the videos behave: nothing loads until a video plays (preload="none", poster first). A video plays muted once most of it is on screen, pauses when it scrolls away, and stays put once the visitor pauses it or it ends on its result. It never starts by itself when the browser asks for reduced motion or to save data. Controls are always there.

What doesn't change: no new headings. The bands' headlines are <p>s, as HomeAudiences does, so each page's H2s keep their count and order for the SEO briefs.

Measuring it. PostHog gets use_case_video_started (with slug, placement and whether it played by itself) and use_case_video_finished. The download buttons beside the videos carry data-ph-capture-attribute-placement="use-case-video", so their autocaptured clicks can be told from the hero's and the closing card's. A funnel of page view, then video finished, then download click, split by page, shows whether the videos move downloads. The privacy policy lists what the browser records event by event, so it gains a sentence on the videos, dated 10 November 2026.

Before the upload. A band shows only videos that are hosted, so production shows none of this until node scripts/guides/upload-videos.mjs has run with the Blob token. In next dev the local copies from preview-videos.mjs play.

The steps come from features/guides/use-cases.ts: each guide cut to three steps that quote the app's labels. use-cases.test.ts keeps each entry's heading and video title in step with its guide, checks the poster exists, and keeps the steps to the docs' prose rules.

Stacked on #2432; the base is feat/tutorial-guides-jobs.

Why

The maintainer asked for the use-case videos on all the For pages and good ones on the homepage, to lift download conversion across the site.

Fixes # (none: asked in chat)

How to test

High-level PR Summary

This PR adds use-case videos throughout the marketing site to demonstrate SurfSense features in action. The homepage gains a See it work section with six tabbed videos (ask files, write reports, flashcards, podcasts, contract redline, questionnaires). Each For page (lawyers, accountants, students, teachers, business) shows 3-4 relevant videos below the hero. Individual feature and job pages display their specific guide video above the How it works steps. Videos autoplay muted when scrolled into view (respecting reduced motion and save-data preferences), pause when scrolled away, and include controls. The implementation tracks video engagement via PostHog events (use_case_video_started and use_case_video_finished) and attributes download button clicks by placement. Videos only render once hosted via the upload script; local development uses preview copies.

⏱️ Estimated Review Time: 15-30 minutes

💡 Review Order Suggestion
Order File Path
1 www/features/guides/use-cases.ts
2 www/features/guides/autoplay.ts
3 www/features/guides/guide-video-source.ts
4 www/features/guides/shown-use-cases.ts
5 www/features/guides/use-case-events.ts
6 www/features/guides/use-case-video.tsx
7 www/features/guides/use-case-tabs.tsx
8 www/features/guides/use-case-section.tsx
9 www/app/(home)/_home/home-content.ts
10 www/app/(home)/_home/home-use-cases.tsx
11 www/app/(home)/page.tsx
12 www/features/downloads/home-download-button.tsx
13 www/app/(home)/ai-for-lawyers/page.tsx
14 www/app/(home)/ai-for-accountants/page.tsx
15 www/app/(home)/ai-for-students/page.tsx
16 www/app/(home)/ai-for-teachers/page.tsx
17 www/app/(home)/private-ai-for-business/page.tsx
18 www/features/audience-pages/audience-sections.tsx
19 www/app/(home)/features/flashcard-generator/page.tsx
20 www/app/(home)/features/quiz-generator/page.tsx
21 www/app/(home)/features/study-guide-maker/page.tsx
22 www/app/(home)/features/podcast-generator/page.tsx
23 www/app/(home)/jobs/contract-redline/page.tsx
24 www/app/(home)/jobs/security-questionnaire/page.tsx
25 www/features/guides/use-cases.test.ts
26 www/features/guides/guide-video.tsx
27 www/app/(home)/_home/home-audiences.tsx
28 www/app/(home)/privacy/page.tsx
29 plans/community-local/tutorials.md
⚠️ Inconsistent Changes Detected
File Path Warning
plans/community-local/tutorials.md This appears to be project documentation/planning notes rather than code changes directly related to implementing the video features on the marketing pages.

Need help? Join our Discord

The guides' videos where visitors decide to download. The homepage gets a band
of tabs under the logos, and each audience page one under its hero: every video
beside three steps and a link to its guide, then the download. The job and
study tool pages play their guide's video above "How it works", with the
download after the steps.

A video loads nothing until it plays, plays muted once most of it is on screen,
pauses when it scrolls away, and never starts by itself for reduced motion or
save-data. A section shows only hosted videos, so production changes once
upload-videos.mjs has run. use_case_video_started and use_case_video_finished
go to PostHog, the download buttons beside the videos carry
placement: use-case-video on their autocaptured clicks, and the privacy page
says so.
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
surf-sense-frontend Ignored Ignored Preview Nov 10, 2026 8:10am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@MODSetter
MODSetter marked this pull request as ready for review November 10, 2026 08:19
@MODSetter
MODSetter changed the base branch from feat/tutorial-guides-jobs to dev November 10, 2026 08:21
@MODSetter
MODSetter merged commit 560d91a into dev Nov 10, 2026
2 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.

1 participant