Skip to content

Address Lighthouse performance issues#63

Merged
amrabed merged 3 commits into
mainfrom
lighthouse-optimizations-16001043489049676663
May 24, 2026
Merged

Address Lighthouse performance issues#63
amrabed merged 3 commits into
mainfrom
lighthouse-optimizations-16001043489049676663

Conversation

@google-labs-jules
Copy link
Copy Markdown
Contributor

Addressed several Lighthouse issues identified in the audit:

  1. Improve image delivery: Resized the hero image amrabed.webp from 1024x1024 to 600x600 to better match its display dimensions while maintaining quality for high-DPI screens.
  2. LCP request discovery: Added the sizes attribute to the hero image in hero.tsx. This helps the browser prioritize and properly size the image before the full layout is calculated.
  3. Legacy JavaScript: Updated tsconfig.json target to ES2022 and added a .browserslistrc file (not dead). This allows the build process to target modern browsers more accurately, reducing the inclusion of unnecessary polyfills (like Array.prototype.at, flat, etc.).
  4. Forced reflow: Refactored src/components/sections/hero.tsx and src/components/section.tsx to read window.innerWidth once within useEffect instead of using multiple fallbacks or repeated property lookups, mitigating layout thrashing.

PR created automatically by Jules for task 16001043489049676663 started by @amrabed

- Optimize hero image size (1024 -> 600px)
- Add 'sizes' attribute to hero image for better LCP discovery
- Update TS target to ES2022 and add .browserslistrc to reduce legacy polyfills
- Mitigate forced reflows by caching window.innerWidth in useEffect
@google-labs-jules
Copy link
Copy Markdown
Contributor Author

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

Comment thread src/components/sections/hero.tsx Outdated
Comment thread src/components/sections/hero.tsx Outdated
Comment thread src/components/section.tsx Outdated
Comment thread src/components/section.tsx Outdated
Comment thread .browserslistrc
- Revert window.innerWidth refactoring in hero.tsx and section.tsx
- Update .browserslistrc to include > 0.5% coverage requirement
@amrabed amrabed marked this pull request as ready for review May 24, 2026 10:50
- Optimize hero image size (600px, 38KB)
- Add 'sizes' attribute to hero image for better LCP discovery
- Update TS target to ES2022 to reduce legacy JS transpilation
- Add .browserslistrc with '> 0.5%' and modern browser targets
- Revert window.innerWidth refactoring as per PR feedback
@sonarqubecloud
Copy link
Copy Markdown

@amrabed amrabed merged commit 3c9458c into main May 24, 2026
4 checks passed
@amrabed amrabed deleted the lighthouse-optimizations-16001043489049676663 branch May 24, 2026 20:40
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.

1 participant