Skip to content

Feature/60s form load threshold#14

Open
subodh2711 wants to merge 7 commits intodevfrom
feature/60s-form-load-threshold
Open

Feature/60s form load threshold#14
subodh2711 wants to merge 7 commits intodevfrom
feature/60s-form-load-threshold

Conversation

@subodh2711
Copy link
Copy Markdown
Collaborator

@subodh2711 subodh2711 commented Feb 9, 2026

@aem-code-sync
Copy link
Copy Markdown

aem-code-sync Bot commented Feb 9, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @subodh2711, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the calculation of form block load times by introducing a new criterion for valid data. It ensures that only form load events with sufficient activity (at least two consecutive events within 60 seconds) are considered, thereby improving the accuracy and relevance of performance metrics. This change also clarifies how different thresholds are applied when calculating series versus facets for form load times.

Highlights

  • New Data Validation Logic: Introduced a new validation step within the formBlockLoadTime function to ensure that only bundles containing at least two consecutive events with a time difference of less than 60 seconds are processed. Bundles not meeting this criterion will now return undefined.
  • Threshold Alignment in Dashboards: The dashboards/performance-dashboard.js file was updated to call formBlockLoadTime without a specific threshold, aligning its behavior with the 'no threshold' facet used in datachunks.js for total view counts.
  • Clarified Threshold Usage: Added comments in datachunks.js to explicitly state that the formBlockLoadTime series uses a 2-minute threshold for percentile calculations, while the facet has no threshold to include all form load times for total views.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • dashboards/performance-dashboard.js
    • Modified the getFormBlockLoadTimeSeconds initialization to call formBlockLoadTime() without a threshold, aligning it with the datachunks.js facet behavior.
  • datachunks.js
    • Added a new function hasConsecutiveEventsUnder60s to check if a bundle contains at least two events with a time delta gap of less than 60 seconds.
    • Integrated hasConsecutiveEventsUnder60s into formBlockLoadTime to filter out bundles that do not meet the 60-second consecutive event requirement.
    • Added clarifying comments for addSeries and addFacet calls related to formBlockLoadTime to indicate when a 2-minute threshold is applied versus no threshold.
Activity
  • No specific review comments or activity have been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@aem-code-sync
Copy link
Copy Markdown

aem-code-sync Bot commented Feb 9, 2026

Page Scores Audits Google
📱 / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ / PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a 60-second threshold for form load time calculations, filtering out user sessions that are likely inactive. This is achieved by adding a check (hasConsecutiveEventsUnder60s) to ensure there are events within a 60-second window in a bundle before considering its form load time. The changes in performance-dashboard.js align the data aggregation with this new logic.

My review identifies a performance issue in datachunks.js where the event array is sorted twice. I've provided a suggestion to refactor the logic to sort only once, which improves efficiency and code clarity.

@subodh2711 subodh2711 requested a review from vdua February 9, 2026 07:47
@aem-code-sync aem-code-sync Bot temporarily deployed to feature/60s-form-load-threshold February 10, 2026 04:41 Inactive
@aem-code-sync aem-code-sync Bot temporarily deployed to feature/60s-form-load-threshold February 10, 2026 04:44 Inactive
@aem-code-sync aem-code-sync Bot temporarily deployed to feature/60s-form-load-threshold February 10, 2026 04:48 Inactive
Extract getSortedEvents() helper so the sort happens once and the
sorted array is reused by both hasConsecutiveEventsUnder60s and
formBlockLoadTime.

Co-authored-by: Cursor <cursoragent@cursor.com>
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