Skip to content

🚀 Prism: Interactive Northern Lights Refraction Canvas - #1495

Closed
alehar9320 wants to merge 1 commit into
mainfrom
prism/aurora-light-refraction-canvas-3039271023233283274
Closed

alehar9320 wants to merge 1 commit into
mainfrom
prism/aurora-light-refraction-canvas-3039271023233283274

Conversation

@alehar9320

Copy link
Copy Markdown
Owner

This PR introduces an interactive Northern Lights light refraction canvas designed by 👩‍🚀 Prism.

Key Enhancements:

  • Native pure TypeScript vector and wave math in src/utils/aurora-math.ts with zero external dependencies.
  • Unit testing with full coverage for wave calculations and smoothstep attenuation in src/utils/aurora-math.test.ts.
  • AuroraCanvas.astro component rendering lightweight marine blue & cyan light refractions.
  • Built with DPR hardware scaling, dynamic mobile step optimization (8px on mobile vs 4px on desktop), prefers-reduced-motion compliance, visibilitychange loop pause/resume, and proper astro:before-swap cleanup.
  • Isolated laboratory showcase route created at src/pages/lab/aurora.astro.
  • Integrated into core site background in BaseLayout.astro.
  • Journal entries updated in .Jules/prism.md.

PR created automatically by Jules for task 3039271023233283274 started by @alehar9320

- Add pure TS math utilities for cubic smoothstep attenuation and multi-layered wave displacement in src/utils/aurora-math.ts
- Add unit tests for aurora-math in src/utils/aurora-math.test.ts
- Add performant AuroraCanvas.astro component with DPR hardware scaling, reduced-motion checks, visibility listeners, and astro:before-swap cleanup
- Integrate AuroraCanvas into BaseLayout.astro and create showcase lab route at src/pages/lab/aurora.astro
- Record metrics and math logic 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.

@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

@alehar9320
alehar9320 temporarily deployed to prism/aurora-light-refraction-canvas-3039271023233283274 - astro-cloudflare-personal-website-web-service PR #1495 September 29, 2026 12:35 — with Render Destroyed
@coderabbitai

coderabbitai Bot commented Sep 29, 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: 0f95fbbf-4001-43c8-a904-3049996a2bef

📥 Commits

Reviewing files that changed from the base of the PR and between 9ff88fc and b08143a.

📒 Files selected for processing (7)
  • .Jules/prism.md
  • src/components/AuroraCanvas.astro
  • src/layouts/BaseLayout.astro
  • src/pages/lab/aurora.astro
  • src/utils/aurora-math.test.ts
  • src/utils/aurora-math.ts
  • worker-configuration.d.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.

@cloudflare-workers-and-pages

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
🔵 In progress
View logs
me b08143a Sep 29 2026, 12:36 PM

@alehar9320-bot

Copy link
Copy Markdown
Collaborator

HARD ABORT — close unmerged

Do not merge. Do not Jules-restack. Do not reopen as Jules.

Prism Interactive Northern Lights Refraction Canvas /lab farm (Jules for alehar9320). Same class as #1482 / #1470 / #1458 / #1446 / #1434 / #1422 / #1410 / #1398 / #1385 / #1367 / #1355 / #1343 / #1331 / #1318 / #921 / #878 / #609.

Tip: b08143ab FULL b08143ab0eee1fbdf7a90977cd3cd77f2e5edc0e
Files: .Jules/prism.md (backdated 2026-03-30) + src/components/AuroraCanvas.astro + src/layouts/BaseLayout.astro (wires canvas into every page) + src/pages/lab/aurora.astro + src/utils/aurora-math.ts + src/utils/aurora-math.test.ts + drive-by worker-configuration.d.ts noise

Why: Owner lock — no Prism onto main; no /lab/* onto main (even noindex). Decorative canvas lab (multi-harmonic aurora waves, pointer cubic-smoothstep refraction, continuous rAF) plus site-wide BaseLayout injection is not personal-brand / employer-marketing value for visitors. Taste hold: lab/prism/aurora experiments are decorative theater, not visitor proof. Anti-slop: aurora blobs / glow as page identity. Nav is clean today — 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 9ff88fc1. Bot only.

@alehar9320-bot

Copy link
Copy Markdown
Collaborator

HARD ABORT — close unmerged

Do not merge. Do not Jules-restack. Do not reopen as Jules.

Prism Interactive Northern Lights Refraction Canvas farm (Jules for alehar9320). Same class as #1482 / #1470 / #1458 / #1446 / #1434 / #1422 / #1410 / #1398 / #1385 / #1367 / #1355 / #1343 / #1331 / #1318 / #1148 / #1130 / #921 / #878.

Tip: b08143ab FULL b08143ab0eee1fbdf7a90977cd3cd77f2e5edc0e
Files: src/components/AuroraCanvas.astro + src/layouts/BaseLayout.astro (site-wide mount) + src/pages/lab/aurora.astro + src/utils/aurora-math.ts + src/utils/aurora-math.test.ts + .Jules/prism.md (backdated 2026-03-30) + worker-configuration.d.ts noise

Why: Owner lock — no Prism onto main; no /lab/* onto main (even noindex). Nick ACK #1130. This restack is worse than prior /lab-only farms: it wires the aurora canvas into BaseLayout so every visitor page gets continuous idle rAF aurora blobs (cyan/violet gradients) as site identity. Taste hold: lab/prism/aurora experiments are decorative theater, not visitor proof. Anti-slop: aurora/glow as page identity + glass (backdrop-filter) on the lab card. Nav is clean today — 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 9ff88fc1. Bot only.

@codecov

codecov Bot commented Sep 29, 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!

@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 224.89kB (19.56%) ⬆️⚠️, exceeding the configured threshold of 5%.

Bundle name Size Change
molecular-mars-esm 1.37MB 224.89kB (19.56%) ⬆️⚠️

Affected Assets, Files, and Routes:

view changes for bundle: molecular-mars-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
chunks/whats-new_CvqhFYUh.mjs (New) 476.01kB 476.01kB 100.0% 🚀
chunks/entrypoints_BnSJalw1.mjs (New) 192.71kB 192.71kB 100.0% 🚀
chunks/schemas_C-IUqB6H.mjs (New) 160.67kB 160.67kB 100.0% 🚀
virtual_astro_middleware.mjs 108.15kB 123.78kB 691.72% ⚠️
chunks/server_9ZlBI6RG.mjs (New) 105.71kB 105.71kB 100.0% 🚀
chunks/assets_BtHrNxBz.mjs (New) 57.34kB 57.34kB 100.0% 🚀
chunks/sequence_Bk1Qi2Ii.mjs (New) 47.94kB 47.94kB 100.0% 🚀
_astro/whats-new.Bd6q4eSH.css (New) 44.72kB 44.72kB 100.0% 🚀
chunks/shorthash_DVHNNOyo.mjs (New) 29.34kB 29.34kB 100.0% 🚀
chunks/image-binding-transform_DLyWHOhI.mjs (New) 24.19kB 24.19kB 100.0% 🚀
chunks/_astro_data-layer-content_6cgD2iFy.mjs (New) 19.61kB 19.61kB 100.0% 🚀
chunks/parse_CBz_Kehb.mjs (New) 15.01kB 15.01kB 100.0% 🚀
chunks/chat_B0bwjr0F.mjs (New) 12.47kB 12.47kB 100.0% 🚀
chunks/visits_DTmBmQGY.mjs (New) 8.26kB 8.26kB 100.0% 🚀
chunks/release-summary_C3BWv8y0.mjs (New) 7.5kB 7.5kB 100.0% 🚀
chunks/visitor-changelog_28URmBbZ.mjs (New) 7.49kB 7.49kB 100.0% 🚀
chunks/github-releases_JwYTbzlS.mjs (New) 6.99kB 6.99kB 100.0% 🚀
chunks/semanticAttributes_CY_rrnwC.mjs (New) 6.59kB 6.59kB 100.0% 🚀
entry.mjs -4 bytes 5.7kB -0.07%
chunks/release-summary_DuHO-t2A.mjs (New) 5.29kB 5.29kB 100.0% 🚀
chunks/_virtual_astro_session-driver_BEeb4c-H.mjs (New) 3.47kB 3.47kB 100.0% 🚀
chunks/static-image-collection_BBZ9Hkx7.mjs (New) 2.84kB 2.84kB 100.0% 🚀
chunks/releases_DjdVRg0Y.mjs (New) 2.19kB 2.19kB 100.0% 🚀
chunks/image-transform-endpoint_CnGnO08V.mjs (New) 1.83kB 1.83kB 100.0% 🚀
chunks/compiler_ukMr4QGL.mjs (New) 1.77kB 1.77kB 100.0% 🚀
chunks/consts_HUorGNnm.mjs (New) 1.13kB 1.13kB 100.0% 🚀
chunks/image-service-workerd_B083-ZN9.mjs (New) 960 bytes 960 bytes 100.0% 🚀
chunks/rolldown-runtime_Dq6q2LCd.mjs (New) 941 bytes 941 bytes 100.0% 🚀
chunks/_virtual_astro_server-island-manifest_YLRL-jBq.mjs (New) 798 bytes 798 bytes 100.0% 🚀
chunks/content-assets_69YbC_9j.mjs (New) 732 bytes 732 bytes 100.0% 🚀
chunks/noop-entrypoint_BgkNxCyb.mjs (New) 680 bytes 680 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% 🗑️
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% 🗑️
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% 🗑️

Files in chunks/whats-new_CvqhFYUh.mjs:

  • ./src/components/AuroraCanvas.astro → Total Size: 581 bytes

  • ./src/layouts/BaseLayout.astro → Total Size: 1.82kB

@alehar9320-bot

Copy link
Copy Markdown
Collaborator

Performance gate — regress risk (do not merge for perf)

Finn (performance lead). Preview: https://prism-aurora-light-refraction-canvas-3039271023233283274-me.alehar.workers.dev/

What changed

  • New AuroraCanvas.astro runs a continuous requestAnimationFrame canvas (3 filled waves, pointer refraction).
  • Mounted in BaseLayout.astro → every page (home, hire path, etc.), not lab-only.
  • Also /lab/aurora/ (lab page embeds a second canvas; querySelector('.aurora-canvas') only initializes the first).
  • Mitigations present: prefers-reduced-motion, visibilitychange pause, astro:before-swap teardown, DPR≤2, mobile step 8px. Still not enough for a site-wide forever-loop.
  • Inline client script (~3 KB). _astro hashed JS totals stay 345332 B (= prod) — parity is misleading because the aurora work is inline HTML, not a new chunk.
  • No new images/fonts/third-party/cache headers.

Lighthouse (Chrome CLI) — homepage

Prod mobile Preview mobile Preview desktop
Perf score 98 73 77 (prod desktop 80)
LCP 2.1 s 5.3 s 2.6 s
FCP 1.8 s 2.9 s 1.8 s
Speed Index 1.8 s 4.7 s 1.8 s
Main-thread 0.7 s 3.1 s (~4×) 3.3 s (~5×)
TBT 10 ms 10 ms 10 ms

Main-thread “other” (rAF/paint loop) jumps ~222 ms → ~2343 ms on mobile home. Lab /lab/aurora/ mobile score 91 but main-thread still ~3.2 s.

Ask

  1. Remove AuroraCanvas from BaseLayout — keep it lab-scoped only (and fix double-mount / init-first-only on /lab/aurora/).
  2. Do not land this on main while it paints every visitor page at 60 fps.

Never merging from this gate.

This branch was successfully deployed

No deployments
prism/aurora-light-refraction-canvas-3039271023233283274 - astro-cloudflare-personal-website-web-service PR #1495 — b08143ab Deployed Sep 29, 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