Plan: Homepage Feature Showcase + Activity Preview for Visitors
Implement the following plan:
Plan: Homepage Feature Showcase + Activity Preview for Visitors
Overview
Two changes to make the site more accessible to casual visitors:
- Add a feature showcase section below the homepage chat terminal
- Replace the generic "log in" prompt on activity components with a read-only activity preview
Part 1: Homepage Feature Showcase
File to Modify
apps/web/app/page.tsx
Approach
Add a grid of feature cards below the TerminalPrompt component, inside the existing relative z-10 container. The homepage is a client component (needs shared terminalState), but the showcase is static content — just inline JSX with Link components.
Layout
- 2×2 grid on desktop (
md:grid-cols-2), single column on mobile - Same max-width as the terminal area (
max-w-3xl) - Cards follow the blog page pattern:
border-border hover:border-accent/50 hover:bg-background-secondary rounded-lg border p-5 transition-colors - Monospace
/routetag, serif heading, muted description
Three Feature Cards
-
Conversational Assessments (
/assessmentstag) → links to/design/assessments- "AI-powered conversations that evaluate understanding through dialogue, not multiple choice."
-
Course Assistant (
/chattag) → links to/chat- "Ask questions about the course anytime — try the terminal above, or log in for full access."
-
In-Class Activities (
/meettag) → links to/meet- "Real-time paired and group activities with role assignment, stage progression, and instructor controls."
Grid layout: 3 columns on desktop (md:grid-cols-3), single column on mobile.
Blog Section (below feature cards)
A separate, prominent link to the blog beneath the feature grid. Not a feature card — more of a "From the Blog" callout that stands on its own. Simple link with the /blog route tag and a brief description, centered.
Test IDs
- Section:
feature-showcase - Cards:
feature-card-assessments,feature-card-chat,feature-card-activities
Part 2: Activity Preview for Non-Logged-In Users
Files to Modify
| File | Change |
|---|---|
apps/web/components/mdx/activity-stages.tsx | Move metadata extraction before auth check; use preview component for unauthenticated users |
apps/web/components/mdx/group-activity.tsx | Pass through children for unauthenticated users (with partner banner) instead of blocking |
testing/e2e/tests/activity-stages.spec.ts | Update unauthenticated test to expect preview |
File to Create
| File | Purpose |
|---|---|
apps/web/components/mdx/activity-stages-preview.tsx | Read-only preview component |
How It Works
ActivityStages (activity-stages.tsx)
Currently, the auth check at line 64 returns early with a login prompt, and the metadata extraction happens after (lines 88-180). Restructure:
- Move metadata extraction (Map declaration, helper functions, metadata-only loop over children) to BEFORE the auth check. Reading
child.propsis safe — it inspects the element tree without rendering. - Add GroupActivity detection: Import
GroupActivityand add anisGroupActivity()type guard (same pattern asisFacilitationNotes). Walk each stage's direct children to detect if the stage contains a GroupActivity. StorehasGroupActivity: booleanin the metadata. - In the
!session?.userbranch, render<ActivityStagesPreview stageMetadata={stageMetadata} />instead of the plain login prompt. - The
indexedChildrenmapping (cloneElement with index prop) stays after the auth check — it's only needed for the authenticated render path.
ActivityStagesPreview (activity-stages-preview.tsx, new)
Server component. Receives stageMetadata Map. Renders:
+------------------------------------------------------+
| IN-CLASS ACTIVITY ~60 min |
| |
| ① Review Assessment Design ~15 min |
| Partner work · roles rotate |
| |
| ② Complete the Turing Test ~20 min |
| |
| ③ Assessment Feedback ~10 min |
| |
| ④ Agents Talking to Agents ~25 min |
| Partner work · roles rotate |
| |
| Log in to participate in this activity. |
| [ Log In ] |
+------------------------------------------------------+
- Stage rows use numbered circle badges (matching
activity-stage-client.tsxpattern) - Total time calculated from
estimatedTimeSecondssum hasGroupActivity→ "Partner work" annotation; combined withrotateRoles→ "Partner work · roles rotate"- Stages without GroupActivity show no annotation (implicitly individual work)
data-testid="activity-stages-preview"
GroupActivity (group-activity.tsx)
Two nesting patterns exist in the codebase:
- Pattern A (scavenger hunts):
<GroupActivity>wraps<ActivityStages>. GroupActivity's auth check fires first. - Pattern B (assessments meeting):
<ActivityStages>wraps content with<GroupActivity>inside individual stages. ActivityStages' auth check fires first.
For Pattern A, if GroupActivity blocks with a login prompt, the ActivityStages preview inside never renders. Fix: In the unauthenticated branch, render a "Partner Activity" banner AND pass through {children}. The children cascade to ActivityStages which renders its own preview.
For Pattern B, ActivityStages catches auth first and shows the preview — GroupActivity's branch is never reached.
Updated unauthenticated branch in group-activity.tsx:
if (!session?.user) {
return (
<div data-testid="group-activity">
<div data-testid="group-activity-preview" className="...">
<span>Partner Activity</span>
<p>This activity involves working with a partner.</p>
</div>
{children}
</div>
);
}
E2E Test Update
Update the existing unauthenticated test in activity-stages.spec.ts to check for activity-stages-preview instead of activity-stages-login-prompt. Verify stage labels are visible and no interactive controls exist.
Verification
# TypeScript check
bunx turbo tsc --filter=@repo/web
# Check homepage renders
curl -sk https://[local-hostname]/ | grep "feature-showcase"
# Run relevant E2E tests
cd testing/e2e && CI=true bunx playwright test --project=homepage
cd testing/e2e && CI=true bunx playwright test --project=activity-stages
# Manual: visit a meeting page in an incognito window to verify activity preview
If you need specific details from before exiting plan mode (like exact code snippets, error messages, or content you generated), read the full transcript at: ~/.claude/projects/-Users-challen-www-usingandunderstanding-ai/9b5053a5-4f50-448e-a2ee-7981c60142bc.jsonl
I'll start by reading the key files I need to modify, then implement the changes.
Continue.
(no content)
Let me read all the key files I need in parallel.
Let me also check the homepage E2E test and a meeting page to see how GroupActivity is used.
(no content)
Now let me start implementing. I'll work on the homepage and the preview component in parallel since they're independent.
Now let me create the ActivityStagesPreview component.
Now restructure activity-stages.tsx — move metadata extraction before auth check, add GroupActivity detection, and render preview for unauthenticated users.
Now I'll restructure activity-stages.tsx. This is a significant rewrite — I need to move metadata extraction before the auth check, add GroupActivity detection, and split the indexing from metadata collection.
Now replace the body of the function — from after const semester through to the end:
Now update group-activity.tsx to pass through children when unauthenticated:
Now update the E2E test:
Now let me run the TypeScript check and verify the dev server is running.
TypeScript passes. Dev server is running. Let me verify the homepage renders the feature showcase and run the E2E tests.
Homepage tests pass. Activity stages tests are running in the background. Let me check on them.
All 15 tests pass, including the updated unauthenticated test.
All done. Here's a summary of the changes:
Part 1: Homepage Feature Showcase (apps/web/app/page.tsx)
- Added a 3-column grid of feature cards below the terminal prompt: Conversational Assessments (
/assessments), Course Assistant (/chat), and In-Class Activities (/meet) - Added a centered "From the Blog" callout below the feature grid
- Cards use the same styling pattern as the blog page
Part 2: Activity Preview for Visitors
activity-stages-preview.tsx(new) — Read-only server component showing numbered stage list with time estimates, "Partner work · roles rotate" annotations, and a login CTAactivity-stages.tsx— Moved metadata extraction (Map, helper functions, loop) before the auth check; addedGroupActivitydetection viahasGroupActivityChild(); unauthenticated users now see<ActivityStagesPreview>instead of a bare login promptgroup-activity.tsx— Unauthenticated branch now renders a "Partner Activity" banner and passes through{children}, so nested<ActivityStages>can render its own previewactivity-stages.spec.ts— Updated unauthenticated test to expectactivity-stages-previewwith visible stage labels and no interactive controls
Verification: TypeScript passes, homepage E2E tests pass (7/7), activity-stages E2E tests pass (15/15).
Read the output file to retrieve the result: [tmp-path]
The background task already completed successfully — I retrieved its output earlier. All 15 activity-stages tests passed.
Your task
First, run git status, git diff, and git log --oneline -10 to understand the current state.
Then add and commit all modified files with a descriptive message. Break the changes into multiple commits if appropriate. If there are untracked files, ask if they should be added or added to the appropriate .gitignore file. The user may also want to take over at this point, so provide an abort option as well. Always check changes for unnecessary debugging statements or logging that might have been accidentally included. Prompt the user if you find any, and offer to remove each one by one. Do not use interactive git staging (git add -p) as it does not work.
I see one untracked file (activity-stages-preview.tsx) which is part of this feature, and the .gitignore change which adds *.m4a — that's a separate, pre-existing change.
No debug statements or unnecessary logging in any of the diffs. Let me split this into two commits: one for the .gitignore change and one for the feature work.
Two commits created:
e1afa87—Add *.m4a to .gitignore45aee44—Add homepage feature showcase and activity preview for visitors(5 files, +241 / -68)
Working tree is clean. Branch is 2 commits ahead of origin.
OK! Now, I added a m4a file with audio that I want to turn into my first blog entry! Perhaps we should use a new slash command for this called /geoff-post. First, transcribe the audio using uvx and WhisperX. Disable speaker annotations. Next, using the audio, generate a new post and add it to the posts directory. At that point I'll take over as far as reviewing the content. I wanted this to be back dated to 1/21 so it's right before the first day of class. I'll record a second entry the day after class.
(no content)
Let me find the audio file and understand the blog post structure first.
(no content)
This is a completely different task. Let me explore the slash command system and the existing blog posts to plan this properly.
(no content)
Let me read the existing blog-post command and an example Geoff-authored post to understand the patterns.
Good, I now have all the context I need. Let me write the plan.