Skip to content

⚡ bolt: [performance improvement]#16

Open
dttdrv wants to merge 1 commit into
mainfrom
bolt-optimize-scroll-progress-11448731114911931233
Open

⚡ bolt: [performance improvement]#16
dttdrv wants to merge 1 commit into
mainfrom
bolt-optimize-scroll-progress-11448731114911931233

Conversation

@dttdrv
Copy link
Copy Markdown
Owner

@dttdrv dttdrv commented Mar 15, 2026

💡 what: updated the .scroll-progress bar to use css transform: scaleX() instead of modifying the width property directly.
🎯 why: animating the width property triggers costly layout recalculations (reflows) on every scroll frame. animating transform offloads the work to the gpu compositor, avoiding layout thrashing.
📊 impact: significantly reduces main thread work during scroll events, preventing jank and ensuring a smoother 60fps scrolling experience.
🔬 measurement: profile the rendering tab in devtools. layout operations should be completely eliminated during scrolling, replaced entirely by fast composite operations.


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

…ransform

- replaced width modification with transform: scaleX in ScrollProgress.update and updateModal methods.
- updated styles.css to use width: 100%, transform: scaleX(0), and transform-origin: left.
- this prevents layout thrashing (forced reflows) during scroll events.
Copilot AI review requested due to automatic review settings March 15, 2026 06:02
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Mar 15, 2026

Deploying personal-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 548b701
Status: ✅  Deploy successful!
Preview URL: https://7ea8a0dc.personal-website-5ns.pages.dev
Branch Preview URL: https://bolt-optimize-scroll-progres-cwng.personal-website-5ns.pages.dev

View logs

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

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

Updates the site’s scroll progress indicator to avoid layout-triggering style updates during scroll, aligning the implementation with compositor-friendly rendering for smoother scrolling.

Changes:

  • Switched .scroll-progress rendering from width updates to transform: scaleX() with transform-origin: left.
  • Updated ScrollProgress.update() / updateModal() to compute progress as 0..1 and set style.transform accordingly.
  • Documented the performance learning/action in .jules/bolt.md.

Reviewed changes

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

File Description
styles.css Makes the progress bar full-width and animates via transform: scaleX() instead of width.
script.js Updates progress calculations and applies transform for both page scroll and modal scroll.
.jules/bolt.md Adds a performance note recommending scaleX() to avoid scroll-time reflows.

💡 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