Repository navigation
feat(site): the homepage hero said "hands you the tree" and showed none growing - #5
Merged
Merged
Conversation
…ne growing Fragments of HTML, CSS, JavaScript and XML now drift in from the edges beside the headline and snap into a parse tree that keeps growing. A pulse runs down each branch as its node lands, and every so often an old branch lets go and the tree re-forms around the gap. It's a canvas in apps/site/src/components/Grove.astro, loaded as a bundled script, so the CSP needs no new hash. It pauses when it's off screen or the tab is hidden, and draws at the device's pixel ratio. With reduced motion it's one finished tree that doesn't move. Below 400 px it grows a smaller, slower tree. The real parse example moves under the headline as a full-width row, with what you wrote, what Parsec built and what it noticed side by side.
jamesconwaydev
enabled auto-merge (squash)
November 30, 2026 02:52
foothillsdigital
approved these changes
Nov 30, 2026
foothillsdigital
left a comment
Collaborator
There was a problem hiding this comment.
Approving b3881e6.
- Build:
pnpm --filter site buildbuilds 19 pages, andastro checkshows 0 errors and 0 warnings. - CSP: the Grove script ships as an external module (
/_astro/Grove.astro_astro_type_script_index_0_lang.*.js, 6.3 KB before gzip) and isn't inline, so_headersneeds no new hash, as you say. - It can't run away or leak:
- Live nodes are capped by
maxNodes(), andprune()drops an old branch when it's reached. - Finished tokens are filtered out every frame.
- The loop stops via
IntersectionObserveroff-screen and onvisibilitychangewhen the tab is hidden. start()refuses to run while hidden, off-screen, already running, or under reduced motion.
- Live nodes are capped by
- Reduced motion: it grows one finished tree and never starts the loop. Its
changelistener switches either way live. The light-scheme listener re-reads the colours. - No layout shift: the canvas is
aria-hidden, and its box is sized in CSS, so nothing moves when it starts.
What I couldn't check here: scripts/check-headers.mjs needs a Playwright browser, and it fails before checking anything on my machine, identically on main. So the header and Lighthouse numbers are yours. I also didn't watch it animate.
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.
Problem
The homepage says Parsec hands you the tree, and the hero showed a static parse example beside the headline and nothing alive. netweir.com and conn3x.org each open on a moving graphic that shows what the project does. parsec.tools didn't.
Change
apps/site/src/components/Grove.astro: fragments of HTML, CSS, JavaScript and XML (<div,@media,=>,xmlns,</p>and so on) drift in from the edges and snap into a parse tree that keeps growing.prefers-reduced-motion: reducegets one finished tree that doesn't move.shadowBlur. It's a bundled script of 2.9 KB gzipped, so the CSP needs no new hash. The canvas isaria-hiddenand its box is sized in CSS, so nothing shifts when it starts.index.astro: the tree takes the hero's right column. The real parse example moves under the headline as a full-width row, with what you wrote, what Parsec built and what it noticed side by side. It keeps the two-column layout up to 900 px and stacks on phones.Tests
pnpm buildandastro checkare clean, with 0 errors and 0 warnings.check-headers.mjs: the home page passes, and every inline script, style and style attribute is hashed./changelog/also reportsattachShadow.The preview from the deploy workflow comes with this PR's run, at https://hero-animation.parsec-site.pages.dev.