From 398cca9796155f50613c5b4272bfaf1eeb08b1ca Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 21:38:36 +0000 Subject: [PATCH 1/8] =?UTF-8?q?=F0=9F=93=9D=20Scribe:=20Add=20docs=20for?= =?UTF-8?q?=20reportWebVitals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: daggerstuff <261005129+daggerstuff@users.noreply.github.com> --- src/utils/performance-optimization.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/utils/performance-optimization.ts b/src/utils/performance-optimization.ts index dc71171da..cd9a22c97 100644 --- a/src/utils/performance-optimization.ts +++ b/src/utils/performance-optimization.ts @@ -5,8 +5,23 @@ */ /** - * Reports Core Web Vitals and other metrics to the console - * Helps with debugging performance issues during development + * Instruments the application to collect and report Core Web Vitals and other key performance metrics. + * + * This function initializes `PerformanceObserver`s for Largest Contentful Paint (LCP), Cumulative Layout Shift (CLS), + * First Input Delay (FID), First Contentful Paint (FCP), and Time to First Byte (TTFB). These metrics are crucial + * for monitoring the real-world user experience and identifying performance bottlenecks. + * + * @remarks + * Reporting is conditionally enabled. It will only log metrics to the console if the `NODE_ENV` environment + * variable is set to `"development"`, or if the `ENABLE_METRICS` environment variable is set to `"true"`. + * + * @example + * ```typescript + * // In a top-level application entry point: + * import { reportWebVitals } from "./utils/performance-optimization"; + * + * reportWebVitals(); + * ``` */ export function reportWebVitals() { if (typeof window !== 'undefined') { From 7ccaa2ad2f4653cc26df4b93f3ab276e473f4791 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 02:12:06 +0000 Subject: [PATCH 2/8] =?UTF-8?q?=F0=9F=93=9D=20Scribe:=20Add=20docs=20for?= =?UTF-8?q?=20reportWebVitals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: daggerstuff <261005129+daggerstuff@users.noreply.github.com> From 0c7d8f270383b77cd369016e96fe380918f5a3b8 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 02:58:56 +0000 Subject: [PATCH 3/8] =?UTF-8?q?=F0=9F=93=9D=20Scribe:=20Add=20docs=20for?= =?UTF-8?q?=20reportWebVitals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: daggerstuff <261005129+daggerstuff@users.noreply.github.com> From 7ab5e070eb5e25dac617368789142cc04b810df1 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 03:30:35 +0000 Subject: [PATCH 4/8] =?UTF-8?q?=F0=9F=93=9D=20Scribe:=20Add=20docs=20for?= =?UTF-8?q?=20reportWebVitals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: daggerstuff <261005129+daggerstuff@users.noreply.github.com> From 5323e78050495133ddf44dc67ba15d19b63945ae Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 04:02:53 +0000 Subject: [PATCH 5/8] =?UTF-8?q?=F0=9F=93=9D=20Scribe:=20Add=20docs=20for?= =?UTF-8?q?=20reportWebVitals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: daggerstuff <261005129+daggerstuff@users.noreply.github.com> From abf7f20b309795a73323f7b7802020dd9863787e Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 08:28:11 +0000 Subject: [PATCH 6/8] =?UTF-8?q?=F0=9F=93=9D=20Scribe:=20Add=20docs=20for?= =?UTF-8?q?=20reportWebVitals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: daggerstuff <261005129+daggerstuff@users.noreply.github.com> From 7cc057fdc5aa550b3dc8152d1b187d28f10878bb Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 08:33:44 +0000 Subject: [PATCH 7/8] =?UTF-8?q?=F0=9F=93=9D=20Scribe:=20Add=20docs=20for?= =?UTF-8?q?=20reportWebVitals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: daggerstuff <261005129+daggerstuff@users.noreply.github.com> From ab9642db237fcf491eec3e75b44652d1a9848d71 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 14:35:50 +0000 Subject: [PATCH 8/8] =?UTF-8?q?=F0=9F=93=9D=20Scribe:=20Add=20docs=20for?= =?UTF-8?q?=20reportWebVitals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: daggerstuff <261005129+daggerstuff@users.noreply.github.com>