Skip to content

⚡ bolt: [performance improvement]#15

Open
dttdrv wants to merge 1 commit into
mainfrom
bolt-performance-improvement-10341486672454101574
Open

⚡ bolt: [performance improvement]#15
dttdrv wants to merge 1 commit into
mainfrom
bolt-performance-improvement-10341486672454101574

Conversation

@dttdrv
Copy link
Copy Markdown
Owner

@dttdrv dttdrv commented Mar 14, 2026

💡 What: optimized .scroll-progress bar animation by using transform: scaleX instead of width.
🎯 Why: animating width causes layout thrashing because it triggers a layout recalculation on every frame during scrolling.
📊 Impact: eliminates layout recalculation during scrolling, reducing jank and improving scrolling performance.
🔬 Measurement: verify that the progress bar animates smoothly during scroll and check browser dev tools for layout calculations.


PR created automatically by Jules for task 10341486672454101574 started by @dttdrv

    - optimized `.scroll-progress` bar animation.
    - used `transform: scaleX` instead of `width`.
    - layout calculation happens once, compositing is hardware accelerated.
    - documented learning in `.jules/bolt.md`.
Copilot AI review requested due to automatic review settings March 14, 2026 05:54
@google-labs-jules
Copy link
Copy Markdown

👋 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.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying personal-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: b0019cc
Status: ✅  Deploy successful!
Preview URL: https://fce86234.personal-website-5ns.pages.dev
Branch Preview URL: https://bolt-performance-improvement.personal-website-5ns.pages.dev

View logs

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves scroll performance by changing the scroll progress indicator from a layout-affecting width animation to a compositor-friendly transform: scaleX animation, reducing reflow work during scrolling.

Changes:

  • Updated .scroll-progress styling to use width: 100% with transform: scaleX(...) and transform-origin: left.
  • Updated the scroll progress JS to compute progress as a 0..1 ratio and apply it via style.transform.
  • Refreshed the internal bolt note to document the rationale for the optimization.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
styles.css Switches the progress bar from animating width to animating transform for better scroll performance.
script.js Updates scroll progress calculations and DOM updates to drive scaleX() (0..1) instead of percent widths.
.jules/bolt.md Documents the learning/action behind the scroll progress performance change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

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