Preparing code patches documentation
For the Core web vitals opportunity, AEM Sites Optimizer generates code-level fixes for identified performance issues. You review and prepare these fixes as code patches rather than deploying them directly.
Prepare code patches
Select one or more issues from the Core Web Vitals list, then click Prepare code patch to prepare your selection, or Prepare all code patches to prepare every available patch at once. AEM Sites Optimizer creates a labeled GitHub issue for each fix and automatically opens a linked pull request with the code change, ready for your team to review, test, and merge.
This action is disabled when you don’t have permission to prepare code patches, or when the site isn’t fully configured for it — for example, when no code repository is connected, or patch generation is still in progress. In each case, Sites Optimizer explains why next to the disabled button.
Track prepared code patches
Once you’ve prepared code patches, you can manage them and take next steps from the Deployed tab on the Core Web Vitals details page, alongside the Current and Ignored tabs. A patch’s status there reflects whether its pull request has been merged, not just generated — an issue only moves to Deployed once the fix has actually been merged into your codebase.