feat(landing): add interactive app preview to hero#76
Merged
Conversation
Inspired by pingdotgg#2349 by @maria-rcks. Replaces the static hero (logo + headline + CTA) with an additional interactive preview underneath: a faithful, MarCode-branded recreation of the actual app shell — sidebar with projects/threads, chat timeline with user/assistant/tool turns, composer with model + access + branch controls, and a checkout bar at the bottom. Real interactivity (no static screenshots, no animation hacks): - Click any thread in the sidebar → header, timeline, composer placeholder, branch, worktree, access mode all swap together. - Click any project header → expands/collapses its thread group with a rotating chevron. - Working/Completed status pills track the active thread. The upstream PR was an Astro + 920 lines of vanilla JS + 2300 lines of CSS implementation for T3 Code's Astro marketing app. MarCode's landing is Next.js + React + Tailwind v4, so this is a from-scratch port that takes the *idea* (interactive shell preview replacing a screenshot) and rebuilds it against the existing brand tokens (fresh-syntax, curious-sky, dream-shift, sunbyte, rebel-mint, neo-pine, noir, mindspace) and Klaster Sans + Inter typography. Implementation: - `apps/landing/src/components/AppPreview/data.ts` (~270 lines): PreviewThread / PreviewProject / PreviewTurn shapes + small fixture set covering 4 projects, 8 threads, and turn scripts that reflect recent MarCode work (this app preview, the chat minimap, the rate limit meter, etc.). - `apps/landing/src/components/AppPreview/AppPreview.tsx` (~470 lines): the interactive component. Pure React state — `useState` for the active thread, active model, and the collapsed-projects set. - `apps/landing/src/components/Hero.tsx`: drops `min-h-[85vh]`, mounts the preview in a `max-w-5xl` container below the existing CTA stack. Verified with Playwright at 1280×1100: - Initial render shows the marcode-landing thread active with full user/assistant/tool turn timeline. - Clicking "Wire the chat minimap rail into the timeline" swaps the entire content (header, timeline, composer placeholder, branch, Auto-accept edits access mode) instantly. - Clicking the lawn project header collapses its threads with rotated chevron. - Build passes (`next build`, 23.2 kB additional first-load JS). - Typecheck passes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Inspired by t3code#2349 by @maria-rcks. Per the request, the upstream PR's code was used as the idea — not a 1:1 port — because MarCode's landing is Next.js + React + Tailwind v4 while upstream is Astro + vanilla JS + CSS.
Adds an interactive app preview directly underneath the existing hero CTA: a faithful, MarCode-branded recreation of the actual app shell — sidebar with projects/threads, chat timeline with user/assistant/tool turns, composer with model/access/branch controls, and a checkout bar at the bottom.
What's interactive
Why not a 1:1 port?
The upstream PR is 3,977 lines of Astro template + 920 lines of vanilla client-side JavaScript + 2,300 lines of hand-written CSS, all targeting T3 Code's Astro marketing app. MarCode's landing is a Next.js 15 + React 19 + Tailwind v4 stack, so the upstream Astro/JS/CSS payload doesn't translate. Per the user's instruction ("take the code as inspiration") this PR captures the design intent — interactive shell preview replacing a screenshot — but rebuilds it against the existing MarCode brand tokens and component patterns:
Files
Verified with Playwright (1280×1100)
Test plan
Upstream
Original PR: pingdotgg#2349