Skip to content

🚀 Prism: Interactive Northern Lights Aurora & Refraction Canvas Lab - #1422

Closed
alehar9320 wants to merge 1 commit into
mainfrom
prism-aurora-canvas-lab-15976115017405093014
Closed

alehar9320 wants to merge 1 commit into
mainfrom
prism-aurora-canvas-lab-15976115017405093014

Conversation

@alehar9320

@alehar9320 alehar9320 commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

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

  • New Features
    • Added a Digital Art Laboratory page featuring an interactive Northern Lights aurora canvas.
    • Added pause and resume controls, with animation behavior that respects reduced-motion preferences.
    • Added responsive rendering that adjusts for mobile and low-power devices, with pointer-reactive wave effects.

- 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>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@alehar9320
alehar9320 temporarily deployed to prism-aurora-canvas-lab-15976115017405093014 - astro-cloudflare-personal-website-web-service PR #1422 September 23, 2026 12:23 — with Render Destroyed
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Review in Change Stack →

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 4b1a2ee4-9b3e-4427-a55e-cf1646a04c39

📥 Commits

Reviewing files that changed from the base of the PR and between 819cd75 and e22050e.

📒 Files selected for processing (5)
  • .Jules/prism.md
  • src/pages/lab/aurora.astro
  • src/pages/lab/index.astro
  • src/utils/aurora-math.test.ts
  • src/utils/aurora-math.ts
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@alehar9320-bot

Copy link
Copy Markdown
Collaborator

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 /lab/* onto main. Same farm as #1410 / #1398 / #1385 / #1367 / #1355 / #1331 / #1193 / #1130 / #609 (aurora lab stays closed).

This tip: e22050e7 (full e22050e72cb089f5be0d7973051089fda13d4af7). Files: .Jules/prism.md + src/pages/lab/index.astro + src/pages/lab/aurora.astro + src/utils/aurora-math.ts + src/utils/aurora-math.test.ts. Jules-for-alehar9320 restack — not brand-safe employer-marketing surface.

Closing unmerged as alehar9320-bot. Soft dims N/A. Overlay 69ca717 stays. Hire LinkedIn. Stay off #800.

@alehar9320-bot

Copy link
Copy Markdown
Collaborator

HARD ABORT — close unmerged. Do not merge. Do not Jules-restack. Do not reopen as Jules.

Prism Northern Lights /lab aurora refraction canvas farm (Jules for alehar9320). Same class as #1410 / #1398 / #1385 / #1367 / #1355 / #1343 / #1331 / #1318 / #1306 / #1290 / #1273 / #1259 / #1239 / #1217 / #1193 / #1172 / #1148 / #1130 / #969 / #921 / #878 / #863 / #826 / #776 / #758 / #609.

Tip: e22050e7 FULL e22050e72cb089f5be0d7973051089fda13d4af7
Files: .Jules/prism.md (backdated 2026-03-31) + src/pages/lab/index.astro + src/pages/lab/aurora.astro + src/utils/aurora-math.ts + src/utils/aurora-math.test.ts

Why: Owner lock — no Prism onto main; no /lab/* onto main (even noindex). Decorative canvas lab (multi-harmonic ribbons, pointer refraction, glass pause chrome, status glow) is not personal-brand / employer-marketing value for visitors. Taste hold: lab/prism/aurora experiments are decorative theater, not visitor proof. Nav is clean today (Home / Work / Biography / What's New / Contact) — do not invent a Lab route into it.

@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 69ca717. Hire LinkedIn. Stay off #800. Live 819cd759. Bot only.

@codecov

codecov Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Bundle Report

Changes will decrease total bundle size by 562.07kB (-48.89%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
molecular-mars-esm 587.7kB -562.07kB (-48.89%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: molecular-mars-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
_astro/page.DJpHR3uV.js (New) 331.33kB 331.33kB 100.0% 🚀
_astro/module.BbXFVpEk.js (New) 240.43kB 240.43kB 100.0% 🚀
_astro/Chat.astro_astro_type_script_index_0_lang.BhisFK3i.js (New) 11.15kB 11.15kB 100.0% 🚀
_astro/PostHog.astro_astro_type_script_index_0_lang.xGu74ZoR.js (New) 2.17kB 2.17kB 100.0% 🚀
_astro/hire-analytics.B3RlwGS_.js (New) 1.37kB 1.37kB 100.0% 🚀
_astro/BaseLayout.astro_astro_type_script_index_0_lang.CuqVq_JZ.js (New) 690 bytes 690 bytes 100.0% 🚀
_astro/contact.astro_astro_type_script_index_0_lang.rfHLAmXU.js (New) 554 bytes 554 bytes 100.0% 🚀
chunks/whats-new_BankhB0t.mjs (Deleted) -280.3kB 0 bytes -100.0% 🗑️
chunks/default-handler_DqHG8eeJ.mjs (Deleted) -192.27kB 0 bytes -100.0% 🗑️
chunks/traceData_Dr_fxZBz.mjs (Deleted) -126.65kB 0 bytes -100.0% 🗑️
chunks/schemas_Cot3sONg.mjs (Deleted) -126.52kB 0 bytes -100.0% 🗑️
chunks/server_2oEWh56Y.mjs (Deleted) -105.31kB 0 bytes -100.0% 🗑️
chunks/assets_lTcd8Z19.mjs (Deleted) -57.34kB 0 bytes -100.0% 🗑️
chunks/sequence_CaMmmLod.mjs (Deleted) -47.7kB 0 bytes -100.0% 🗑️
_astro/whats-new.Bf7CHJhQ.css (Deleted) -43.09kB 0 bytes -100.0% 🗑️
chunks/shorthash_CUWuunCX.mjs (Deleted) -29.34kB 0 bytes -100.0% 🗑️
chunks/image-binding-transform_Cf-85Vgs.mjs (Deleted) -24.19kB 0 bytes -100.0% 🗑️
chunks/_astro_data-layer-content_BvrnG9KS.mjs (Deleted) -19.62kB 0 bytes -100.0% 🗑️
virtual_astro_middleware.mjs (Deleted) -15.63kB 0 bytes -100.0% 🗑️
chunks/parse_Ba8fytvn.mjs (Deleted) -15.01kB 0 bytes -100.0% 🗑️
chunks/chat_zD7YyXHs.mjs (Deleted) -12.01kB 0 bytes -100.0% 🗑️
chunks/visits_CH9uXrqX.mjs (Deleted) -8.18kB 0 bytes -100.0% 🗑️
chunks/visitor-changelog_BxY0qWCV.mjs (Deleted) -6.98kB 0 bytes -100.0% 🗑️
chunks/github-releases_BV2_eBm_.mjs (Deleted) -6.7kB 0 bytes -100.0% 🗑️
entry.mjs (Deleted) -5.7kB 0 bytes -100.0% 🗑️
chunks/release-summary_38ArvXd3.mjs (Deleted) -4.97kB 0 bytes -100.0% 🗑️
chunks/release-summary_CjrmKGpt.mjs (Deleted) -4.91kB 0 bytes -100.0% 🗑️
chunks/_virtual_astro_session-driver__DuTqh8b.mjs (Deleted) -3.47kB 0 bytes -100.0% 🗑️
chunks/static-image-collection_BCOQ0UCH.mjs (Deleted) -2.85kB 0 bytes -100.0% 🗑️
chunks/releases_BfVji4Vx.mjs (Deleted) -2.19kB 0 bytes -100.0% 🗑️
chunks/image-transform-endpoint_iHq_WzOS.mjs (Deleted) -1.83kB 0 bytes -100.0% 🗑️
chunks/compiler_CI7zcT-L.mjs (Deleted) -1.77kB 0 bytes -100.0% 🗑️
chunks/consts_J54VxCWf.mjs (Deleted) -1.12kB 0 bytes -100.0% 🗑️
chunks/image-service-workerd_DAtwUGVM.mjs (Deleted) -960 bytes 0 bytes -100.0% 🗑️
chunks/rolldown-runtime_CsW08brr.mjs (Deleted) -941 bytes 0 bytes -100.0% 🗑️
chunks/_virtual_astro_server-island-manifest_ms-rvHw7.mjs (Deleted) -798 bytes 0 bytes -100.0% 🗑️
chunks/content-assets_CKY12EWb.mjs (Deleted) -732 bytes 0 bytes -100.0% 🗑️
chunks/noop-entrypoint_BWurWioB.mjs (Deleted) -680 bytes 0 bytes -100.0% 🗑️

@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@alehar9320-bot

Copy link
Copy Markdown
Collaborator

Performance gate (Finn) — tip e22050e7

Preview: https://3054ec6e-me.alehar.workers.dev/lab/aurora/
(alias: https://prism-aurora-canvas-lab-15976115017405093014-me.alehar.workers.dev/lab/aurora/)
Workers Builds: success (Version 3054ec6e…). Full tip e22050e72cb089f5be0d7973051089fda13d4af7.

Lighthouse (Chrome CLI, Performance only)

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.fpsCap is displayed only — not used to throttle frames (requestAnimationFrame(draw) every frame while unpaused).
  • prefers-reduced-motion: reduce starts paused; astro:before-swap cancels the frame + removes listeners (good).
  • No visibilitychange / document.hidden / IntersectionObserver gating.
  • Homepage + Nav unchanged: Home / Work / Biography / What’s New / Contact — no /lab/ link on critical path. Lab pages send x-robots-tag: noindex.
  • CSS: backdrop-filter on lab card (blur 12px) + aurora pause control (blur 8px).

Ranked risks

  1. 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.
  2. fpsCap not honored — low-power path advertises 30 FPS but still schedules uncapped frames; mobile/low-power only reduces wave/sample/particle counts.
  3. Per-frame wave + refraction across width/sampleStep × waveCount — explains the 4.0 s / 2.3 s main-thread vs baseline.
  4. Stacked backdrop-filter on lab chrome on top of canvas fills (extra compositor cost).

Asks (if this class is ever revived — note PR already HARD ABORT / closed)

  1. Pause rAF on document.visibilityState === 'hidden' and when an IntersectionObserver reports the canvas out of view; resume on visible.
  2. Actually honor fpsCap (frame-time gate / skip frames) — especially the low-power 30 FPS path.
  3. Keep Pause + prefers-reduced-motion (good); consider default-paused on low-end.
  4. Drop or consolidate redundant backdrop-filter (one surface is enough).
  5. 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 branch was successfully deployed

No deployments
prism-aurora-canvas-lab-15976115017405093014 - astro-cloudflare-personal-website-web-service PR #1422 — e22050e7 Deployed Sep 23, 2026 by alehar9320
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants