Repository navigation
🚀 Prism: Interactive Northern Lights Aurora & Refraction Canvas Lab - #1422
alehar9320 wants to merge 1 commit into
Conversation
- Implement pure TypeScript math utilities in src/utils/aurora-math.ts for compound aurora wave rendering and cubic smoothstep light refraction. - Add comprehensive Vitest unit test suite src/utils/aurora-math.test.ts. - Create interactive laboratory pages src/pages/lab/index.astro and src/pages/lab/aurora.astro with lifecycle teardown on astro:before-swap, prefers-reduced-motion check, and mobile scaling. - Record metrics and patterns in .Jules/prism.md. Co-authored-by: alehar9320 <5390430+alehar9320@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
HARD ABORT — close unmerged@jules Do not restack. Do not reopen. Do not push fixes. This PR is closed as Owner policy. Why: Prism /lab (Northern Lights aurora + refraction canvas) is a standing Owner lock: No Prism onto main. No This tip: Closing unmerged as alehar9320-bot. Soft dims N/A. Overlay |
|
HARD ABORT — close unmerged. Do not merge. Do not Jules-restack. Do not reopen as Jules. Prism Northern Lights Tip: Why: Owner lock — no Prism onto main; no @jules — stop. Do not push follow-ups, do not open another Prism / aurora /lab PR, do not restack this task. Owner lock stands. Closing as not planned. Soft dims N/A. Overlay |
Bundle ReportChanges will decrease total bundle size by 562.07kB (-48.89%) ⬇️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: molecular-mars-esmAssets Changed:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Performance gate (Finn) — tip
|
| Form factor | Route | Score | FCP | LCP | TBT | CLS | SI | Transfer | Main-thread |
|---|---|---|---|---|---|---|---|---|---|
| Mobile | /lab/aurora/ |
73 | 2.9 s | 5.2 s | 22 ms | 0 | 4.7 s | 601 KiB | 4.0 s |
| Desktop | /lab/aurora/ |
100 | 0.5 s | 0.6 s | 0 ms | 0.011 | 0.8 s | 616 KiB | 2.3 s |
| Mobile | /lab/ |
73 | 2.9 s | 5.2 s | 20 ms | 0 | 4.6 s | 600 KiB | 1.1 s |
| Desktop | /lab/ |
100 | 0.5 s | 0.6 s | 0 ms | 0.019 | 0.7 s | 615 KiB | 0.3 s |
| Mobile | / (same preview, baseline) |
73 | 2.9 s | 5.2 s | 14 ms | 0 | 4.8 s | 601 KiB | 0.8 s |
| Desktop | / (baseline) |
100 | 0.5 s | 0.6 s | 0 ms | 0.017 | 0.7 s | 616 KiB | 0.3 s |
Load CWV on /lab/aurora/ tracks the site baseline (fonts / BaseLayout / Chat / PostHog). Main-thread during the gather is ~5× homepage on mobile (4.0 s vs 0.8 s) and ~8× on desktop (2.3 s vs 0.3 s) — driven by the continuous canvas requestAnimationFrame loop (wave + refraction every frame). Transfer delta vs / is negligible (~0–1 KiB); unused-JS opportunity ~71–94 KiB is mostly shared/third-party, not a new large aurora chunk (math + draw loop ships as a small Astro-processed inline module).
Same class as #1410 (mobile LH ~72, LCP ~5.4 s, main ~1.5 s on /lab/ then) — this tip’s dedicated /lab/aurora/ page is worse on sustained main-thread because the rAF lab is the whole page.
Manual / source skim
/lab/and/lab/aurora/render; canvas shows teal/green ribbons; status reads “60 FPS · Interactive”; Pause control present.config.fpsCapis displayed only — not used to throttle frames (requestAnimationFrame(draw)every frame while unpaused).prefers-reduced-motion: reducestarts paused;astro:before-swapcancels the frame + removes listeners (good).- No
visibilitychange/document.hidden/IntersectionObservergating. - Homepage + Nav unchanged: Home / Work / Biography / What’s New / Contact — no
/lab/link on critical path. Lab pages sendx-robots-tag: noindex. - CSS:
backdrop-filteron lab card (blur 12px) + aurora pause control (blur 8px).
Ranked risks
- Continuous rAF with no off-screen / tab-hidden pause — keeps painting when the tab is backgrounded or the canvas scrolled away; battery / thermal / shared main-thread cost.
fpsCapnot honored — low-power path advertises 30 FPS but still schedules uncapped frames; mobile/low-power only reduces wave/sample/particle counts.- Per-frame wave + refraction across width/sampleStep × waveCount — explains the 4.0 s / 2.3 s main-thread vs baseline.
- Stacked
backdrop-filteron lab chrome on top of canvas fills (extra compositor cost).
Asks (if this class is ever revived — note PR already HARD ABORT / closed)
- Pause rAF on
document.visibilityState === 'hidden'and when anIntersectionObserverreports the canvas out of view; resume on visible. - Actually honor
fpsCap(frame-time gate / skip frames) — especially the low-power 30 FPS path. - Keep Pause +
prefers-reduced-motion(good); consider default-paused on low-end. - Drop or consolidate redundant
backdrop-filter(one surface is enough). - Keep
/lab/*off Nav / homepage / primary journeys (already true today — do not invent a Lab nav item).
Verdict: REGRESS_RISK for sustained main-thread animation (visibility ungated, fpsCap unused) even though route-isolated and load CWV ≈ baseline. Never merge from this gate.
— Finn (perf gate), as alehar9320-bot
This PR introduces an interactive digital art laboratory and Northern Lights aurora canvas experiment. It includes compound sine wave math and cubic smoothstep optical light refraction utilities, full unit test coverage, responsive mobile performance scaling, accessibility controls, and lifecycle teardown on Astro page transitions.
PR created automatically by Jules for task 15976115017405093014 started by @alehar9320
Summary by CodeRabbit