Skip to content

Removed large assets, replaced media with CDN links#350

Merged
IAmKio merged 8 commits intostagingfrom
improve/cdn-assets
Jun 24, 2025
Merged

Removed large assets, replaced media with CDN links#350
IAmKio merged 8 commits intostagingfrom
improve/cdn-assets

Conversation

@IAmKio
Copy link
Collaborator

@IAmKio IAmKio commented Jun 23, 2025

Description

  • Removed: Large media assets
  • Improved: Repaced media assets with CDN links

How Has This Been Tested?

  • Locally

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Summary by CodeRabbit

  • Chores
    • Updated all image and video assets across multiple pages and components to load from a CDN for improved performance and reliability.
    • Removed an automated workflow that updated the token list on pull requests.
    • Enhanced build optimization by configuring chunk splitting for vendor modules.

@IAmKio IAmKio requested a review from RanaBug June 23, 2025 16:48
@IAmKio IAmKio self-assigned this Jun 23, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 23, 2025

"""

Walkthrough

All image and video asset URLs in the LandingPage, Developers, Footer, Header, GlobalStyles, and WaitList components were updated from local relative paths to absolute URLs referencing a CDN. A new splitChunks optimization configuration was added in config-overrides.js to manage vendor chunk size. The GitHub Actions workflow for downloading the latest token list was removed entirely.

Changes

File(s) Change Summary
src/pages/Landing.jsx, src/pages/Developers.jsx, src/components/LandingPage/Footer/index.jsx, src/components/LandingPage/Header/index.jsx, src/components/LandingPage/GlobalStyles/index.jsx, src/pages/WaitList.jsx Updated all image and video asset URLs to use CDN paths
config-overrides.js Added splitChunks config to optimize vendor chunk size
.github/workflows/download-latest-tokenlist.yml Removed GitHub Actions workflow that automated token list updates

Suggested reviewers

  • RanaBug

Poem

🐇
From local files to CDN skies,
Our assets now swiftly fly.
Images and videos, fast and bright,
Served from the cloud, what a sight!
Chunks split smart, the code runs light,
A hop forward, all just right!
🥕✨
"""

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

npm error Exit handler never called!
npm error This is an error with npm itself. Please report this error at:
npm error https://github.com/npm/cli/issues
npm error A complete log of this run can be found in: /.npm/_logs/2025-06-24T11_02_43_367Z-debug-0.log


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 75abf6d and 6d0b24d.

📒 Files selected for processing (1)
  • config-overrides.js (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • config-overrides.js
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: lint
  • GitHub Check: unit-tests
  • GitHub Check: build
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (6)
src/pages/Landing.jsx (6)

24-27: Add lazy loading for hero image

Deferring off-screen images can improve initial page load performance.

Apply this diff:

@@ 24-27
-              <img
-                src="https://cdn.pillarx.app/home-px.png"
-                alt="PillarX logo"
-              />
+              <img
+                src="https://cdn.pillarx.app/home-px.png"
+                alt="PillarX logo"
+                loading="lazy"
+                decoding="async"
+              />

65-68: Provide fallback content for unsupported browsers in video

Including fallback markup inside each <video> improves accessibility for formats not supported by the user’s browser.

Example diff:

@@ 58-70
-               <video
-                 width="100%"
-                 preload="none"
-                 autoPlay
-                 loop
-                 muted
-                 playsInline
-                 poster="https://cdn.pillarx.app/home-feature-1.png"
-               >
-                 <source
-                   src="https://cdn.pillarx.app/home-feature-1.mp4"
-                   type="video/mp4"
-                 />
-               </video>
+               <video
+                 width="100%"
+                 preload="none"
+                 autoPlay
+                 loop
+                 muted
+                 playsInline
+                 poster="https://cdn.pillarx.app/home-feature-1.png"
+               >
+                 <source
+                   src="https://cdn.pillarx.app/home-feature-1.mp4"
+                   type="video/mp4"
+                 />
+                 {/* Fallback: browser does not support embedded videos */}
+                 Your browser does not support embedded videos.
+               </video>

93-97: Provide fallback content in second feature video

Mirror the accessibility enhancement by adding a fallback message in this <video> block.

@@ 86-98
-                <video
-                  width="100%"
-                  preload="none"
-                  autoPlay
-                  loop
-                  muted
-                  playsInline
-                  poster="https://cdn.pillarx.app/home-feature-2.png"
-                >
-                  <source
-                    src="https://cdn.pillarx.app/home-feature-2.mp4"
-                    type="video/mp4"
-                  />
-                </video>
+                <video
+                  width="100%"
+                  preload="none"
+                  autoPlay
+                  loop
+                  muted
+                  playsInline
+                  poster="https://cdn.pillarx.app/home-feature-2.png"
+                >
+                  <source
+                    src="https://cdn.pillarx.app/home-feature-2.mp4"
+                    type="video/mp4"
+                  />
+                  {/* Fallback: browser does not support embedded videos */}
+                  Your browser does not support embedded videos.
+                </video>

119-123: Provide fallback content in third feature video

Ensure this <video> tag also includes fallback text for unsupported environments.

@@ 111-125
-                <video
-                  width="100%"
-                  preload="none"
-                  autoPlay
-                  loop
-                  muted
-                  playsInline
-                  poster="https://cdn.pillarx.app/home-feature-3.png"
-                >
-                  <source
-                    src="https://cdn.pillarx.app/home-feature-3.mp4"
-                    type="video/mp4"
-                  />
-                </video>
+                <video
+                  width="100%"
+                  preload="none"
+                  autoPlay
+                  loop
+                  muted
+                  playsInline
+                  poster="https://cdn.pillarx.app/home-feature-3.png"
+                >
+                  <source
+                    src="https://cdn.pillarx.app/home-feature-3.mp4"
+                    type="video/mp4"
+                  />
+                  {/* Fallback: browser does not support embedded videos */}
+                  Your browser does not support embedded videos.
+                </video>

145-147: Add lazy loading for dashboard image

Deferring non-critical images helps reduce initial payload.

@@ 144-147
-              <img
-                src="https://cdn.pillarx.app/home-hero.png"
-                alt="PillarX Dashboard"
-              />
+              <img
+                src="https://cdn.pillarx.app/home-hero.png"
+                alt="PillarX Dashboard"
+                loading="lazy"
+                decoding="async"
+              />

214-217: Refine alt text and defer logo loading

The current alt="home-logo" is generic—use a descriptive label, and add lazy loading for performance.

@@ 214-217
-              <img
-                src="https://cdn.pillarx.app/home-logo-px.svg"
-                alt="home-logo"
-              />
+              <img
+                src="https://cdn.pillarx.app/home-logo-px.svg"
+                alt="PillarX logo"
+                loading="lazy"
+              />
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aef9df8 and 46de174.

⛔ Files ignored due to path filters (15)
  • public/landing-images/bottomRightShadow.png is excluded by !**/*.png
  • public/landing-images/centerLineGradient.png is excluded by !**/*.png
  • public/landing-images/home-feature-1.gif is excluded by !**/*.gif
  • public/landing-images/home-feature-1.mp4 is excluded by !**/*.mp4
  • public/landing-images/home-feature-1.png is excluded by !**/*.png
  • public/landing-images/home-feature-2.gif is excluded by !**/*.gif
  • public/landing-images/home-feature-2.mp4 is excluded by !**/*.mp4
  • public/landing-images/home-feature-2.png is excluded by !**/*.png
  • public/landing-images/home-feature-3.gif is excluded by !**/*.gif
  • public/landing-images/home-feature-3.mp4 is excluded by !**/*.mp4
  • public/landing-images/home-feature-3.png is excluded by !**/*.png
  • public/landing-images/home-hero.png is excluded by !**/*.png
  • public/landing-images/home-logo-px.svg is excluded by !**/*.svg
  • public/landing-images/topBottomGradient.png is excluded by !**/*.png
  • public/landing-images/topShadow.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • src/pages/Landing.jsx (6 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: lint
  • GitHub Check: unit-tests
  • GitHub Check: build

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 23, 2025

Deploying x with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6d0b24d
Status: ✅  Deploy successful!
Preview URL: https://bdcade2e.x-e62.pages.dev
Branch Preview URL: https://improve-cdn-assets.x-e62.pages.dev

View logs

@github-actions github-actions bot temporarily deployed to Preview (improve/cdn-assets) June 23, 2025 22:50 Inactive
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 46de174 and 5f6601b.

📒 Files selected for processing (1)
  • config-overrides.js (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: unit-tests
  • GitHub Check: lint
  • GitHub Check: build

@github-actions github-actions bot temporarily deployed to Preview (improve/cdn-assets) June 23, 2025 23:37 Inactive
@github-actions github-actions bot requested a deployment to Preview (improve/cdn-assets) June 24, 2025 00:21 Abandoned
@github-actions github-actions bot temporarily deployed to Preview (improve/cdn-assets) June 24, 2025 09:47 Inactive
@github-actions github-actions bot requested a deployment to Preview (improve/cdn-assets) June 24, 2025 09:56 Abandoned
@github-actions github-actions bot temporarily deployed to Preview (improve/cdn-assets) June 24, 2025 10:47 Inactive
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

♻️ Duplicate comments (1)
config-overrides.js (1)

24-29: The TerserPlugin removal may still impact crypto functionality.

The commented out TerserPlugin was specifically handling minification for the @noble/hashes/esm/sha3.js cryptographic library. While the new module filtering approach (lines 31-48) excludes the file entirely, this is a different solution that may not address the original minification concerns.

Please confirm that the new module exclusion approach maintains the same cryptographic functionality as the previous TerserPlugin configuration.

🧹 Nitpick comments (1)
config-overrides.js (1)

31-48: Apply optional chaining and clarify the exclusion strategy.

The module filtering approach excludes the crypto file entirely from processing, which differs from the previous minification-specific handling.

Apply this diff to use optional chaining as suggested by static analysis:

-        if (
-          oneOfRule.test &&
-          oneOfRule.test.toString().includes('node_modules')
-        ) {
+        if (oneOfRule.test?.toString().includes('node_modules')) {
           return !oneOfRule.test
             .toString()
             .includes('@noble/hashes/esm/sha3.js');
         }

Additionally, consider adding a comment explaining why this specific crypto file needs to be excluded from module processing.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4cbd39c and 75abf6d.

📒 Files selected for processing (1)
  • config-overrides.js (2 hunks)
🧰 Additional context used
🪛 Biome (1.9.4)
config-overrides.js

[error] 37-38: Change to an optional chain.

Unsafe fix: Change to an optional chain.

(lint/complexity/useOptionalChain)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: lint
  • GitHub Check: unit-tests
  • GitHub Check: build
🔇 Additional comments (1)
config-overrides.js (1)

24-48: Clarify the relationship between webpack changes and CDN optimization.

The webpack configuration changes (commenting out TerserPlugin and adding module filtering) don't appear directly related to the PR's main objective of replacing media assets with CDN links.

Please clarify:

  1. Are these webpack changes necessary for the CDN asset optimization?
  2. Were these changes made to fix build issues encountered during the migration?
  3. Should these configuration changes be in a separate PR focused on build optimization?

This will help ensure the changes are properly documented and tested in the appropriate context.

@IAmKio IAmKio merged commit e80695f into staging Jun 24, 2025
6 checks passed
@IAmKio IAmKio deleted the improve/cdn-assets branch June 25, 2025 08:22
@coderabbitai coderabbitai bot mentioned this pull request Oct 2, 2025
3 tasks
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