From e304ae78774ca9c0d9e8ff47c09122c0aeb86638 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 17 Aug 2026 16:52:47 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=E2=9A=A1=20Bolt:=20optimize=20campaign=20t?= =?UTF-8?q?ype=20lookup=20in=20CampaignBuilderRunner?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert array `.find()` lookups for allowed campaign types in CampaignBuilderRunner to an O(1) Map lookup. Co-authored-by: projectamazonph <286085559+projectamazonph@users.noreply.github.com> --- src/components/tools/CampaignBuilderRunner.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/tools/CampaignBuilderRunner.tsx b/src/components/tools/CampaignBuilderRunner.tsx index f4377b6..8cf431d 100644 --- a/src/components/tools/CampaignBuilderRunner.tsx +++ b/src/components/tools/CampaignBuilderRunner.tsx @@ -47,6 +47,9 @@ const CAMPAIGN_TYPES: { value: CampaignType; label: string; description: string }, ]; +// Bolt optimization: Map campaign types by value for O(1) label lookups +const CAMPAIGN_TYPE_MAP = new Map(CAMPAIGN_TYPES.map((c) => [c.value, c])); + const TARGETING_TYPES: { value: TargetingType; label: string }[] = [ { value: 'MANUAL', label: 'Manual' }, { value: 'AUTO', label: 'Auto' }, @@ -307,7 +310,7 @@ export function CampaignBuilderRunner({ sessionId, scenario, toolSlug }: Campaig

Allowed campaign types:{' '} - {allowedTypes.map((t) => CAMPAIGN_TYPES.find((c) => c.value === t)?.label ?? t).join(' · ')} + {allowedTypes.map((t) => CAMPAIGN_TYPE_MAP.get(t)?.label ?? t).join(' · ')}
Allowed bid strategies: {allowedStrategies.join(' · ')}

From faa87fdb2611a5fd21f4f5cc27e8ea8fa07ce731 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 17 Aug 2026 16:58:27 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=E2=9A=A1=20Bolt:=20optimize=20campaign=20t?= =?UTF-8?q?ype=20lookup=20in=20CampaignBuilderRunner?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert array `.find()` lookups for allowed campaign types in CampaignBuilderRunner to an O(1) Map lookup. Co-authored-by: projectamazonph <286085559+projectamazonph@users.noreply.github.com> From b5ec18f98158c3150753a76afba3e131ada06084 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 17 Aug 2026 17:04:00 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=E2=9A=A1=20Bolt:=20optimize=20campaign=20t?= =?UTF-8?q?ype=20lookup=20in=20CampaignBuilderRunner?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Convert array `.find()` lookups for allowed campaign types in CampaignBuilderRunner to an O(1) Map lookup. Co-authored-by: projectamazonph <286085559+projectamazonph@users.noreply.github.com>