Homepage: Trim copy and archive story sections. - #4
Merged
Merged
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
There’s a confirmed logic bug in the new ClipboardTrail event filter (and a small but real robustness issue in prerender manifest access) that should be fixed before merging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR trims the homepage while preserving the retired “story” sections as an unlinked, pre-rendered /story/ archive that is excluded from indexing and the sitemap, and keeps story-only code/styles off the homepage bundle.
Changes:
- Adds a
/story/archive route that loads story components/styles only when directly visited, while keeping the homepage focused on the tour, covenant, downloads, feedback, and footer. - Introduces shared scroll-reveal behavior via a dedicated hook and re-scopes CSS so story styles live in
story.css. - Updates the prerender/audit pipeline to emit and validate the story archive HTML + bundle isolation (via Vite build manifest).
File summaries
| File | Description |
|---|---|
| vite.config.ts | Enables build manifest generation for prerender/audit tooling. |
| src/useScrollReveal.ts | Extracts scroll-reveal observer logic into a reusable hook. |
| src/styles.css | Removes story-specific styles from the global stylesheet; tweaks homepage layout and spacing. |
| src/StorySections.tsx | Adds the archived story route content (retired sections) as a separate component. |
| src/story.css | Adds story-only styles and animations, scoped to the archive route. |
| src/prerender.tsx | Allows prerendering either the homepage or story archive via a flag. |
| src/main.tsx | Dynamically imports story content only when on /story/. |
| src/ClipboardTrail.tsx | Adds the story-only “Clipboard Trail” interaction component. |
| src/CinematicAppFeature.tsx | Trims/revises cinematic feature headlines and kickers. |
| src/App.tsx | Removes story sections from homepage, supports injecting story content, and simplifies nav. |
| scripts/prerender.mjs | Generates /story/index.html, injects story CSS links, and applies noindex/canonical overrides. |
| scripts/audit-site.mjs | Extends audits for story archive correctness + homepage/story bundle isolation. |
| README.md | Documents the new /story/ archive behavior and indexing constraints. |
| public/seo.css | Removes header/footer dividers to match updated homepage styling. |
| public/privacy/index.html | Expands footer navigation links on the privacy page. |
| public/features/index.html | Expands footer navigation links on the features page. |
| public/download/index.html | Expands footer navigation links on the download page. |
| public/cli/index.html | Expands footer navigation links on the CLI page. |
Review details
Files not reviewed (1)
- src/story.css: Generated file
- Files reviewed: 16/18 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+17
to
+19
| const manifest = JSON.parse(await readFile(path.join(root, "dist", ".vite", "manifest.json"), "utf8")); | ||
| const storyStyles = manifest["src/StorySections.tsx"].css; | ||
| if (!storyStyles?.length) throw new Error("Missing story stylesheet in build manifest"); |
Comment on lines
+45
to
+48
| const onCopy = (event: Event) => { | ||
| const detail = (event as CustomEvent<string>).detail; | ||
| if (detail && !detail.includes("declined")) setTrail(current => [{ id: trailEntryId.current++, text: detail.replace(/\s+/g, " ").trim() }, ...current].slice(0, 6)); | ||
| }; |
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.
Trim the home page and preserve the retired sections at the unlinked
/story/URL. The archive keeps its original copy, interactions, and Clipboard Trail, usesnoindex, nofollow, and stays out of the sitemap.The home page retains the cinematic app tour, Copycat Covenant, downloads, feedback, and footer. This change also applies the reviewed headline edits, simplifies navigation, balances the hero spacing, removes header/footer dividers, and makes the Covenant ribbon cover its divider.
Story components, Trail listeners, and story-specific styles load only on the archive route. Both routes are pre-rendered, including the archive stylesheet for no-script visitors.
Validation:
npm test(release-selection unit tests, TypeScript, production build, metadata/routes/assets audits, story placement and bundle-isolation checks);git diff --check. Moved section source was compared with the original before cleanup.