From 94295e54a0b99fe02c123aef3192edd3f30ee8d2 Mon Sep 17 00:00:00 2001 From: "probatai[bot]" <236084945+probatai[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 13:29:25 +0000 Subject: [PATCH 01/14] probat: add activated component probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/cfb29f35-4501-4ffe-bd95-b4498eaf0d97.tsx --- .../cfb29f35-4501-4ffe-bd95-b4498eaf0d97.tsx | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/cfb29f35-4501-4ffe-bd95-b4498eaf0d97.tsx diff --git a/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/cfb29f35-4501-4ffe-bd95-b4498eaf0d97.tsx b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/cfb29f35-4501-4ffe-bd95-b4498eaf0d97.tsx new file mode 100644 index 00000000..de7da2c4 --- /dev/null +++ b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/cfb29f35-4501-4ffe-bd95-b4498eaf0d97.tsx @@ -0,0 +1,83 @@ +import React from 'react' +import './Hero.css' + +const Hero: React.FC = () => { + return ( +
+ +
+
+
+

+ Build Something + Amazing +

+

+ Create stunning websites and applications with our modern tools and + cutting-edge technology. Join thousands of developers who trust our platform. +

+
+ + +
+
+
+ 10K+ + Active Users +
+
+ 99.9% + Uptime +
+
+ 24/7 + Support +
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+ ) +} + +export default Hero \ No newline at end of file From 9963dc45df9870a1d2d52b518df79da021173994 Mon Sep 17 00:00:00 2001 From: "probatai[bot]" <236084945+probatai[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 13:29:32 +0000 Subject: [PATCH 02/14] probat: add activated component probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/a3eeb671-6901-431c-9042-e5b685c0b8b4.tsx --- .../a3eeb671-6901-431c-9042-e5b685c0b8b4.tsx | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/a3eeb671-6901-431c-9042-e5b685c0b8b4.tsx diff --git a/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/a3eeb671-6901-431c-9042-e5b685c0b8b4.tsx b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/a3eeb671-6901-431c-9042-e5b685c0b8b4.tsx new file mode 100644 index 00000000..e303b59b --- /dev/null +++ b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/a3eeb671-6901-431c-9042-e5b685c0b8b4.tsx @@ -0,0 +1,83 @@ +import React from 'react' +import './Hero.css' + +const Hero: React.FC = () => { + return ( +
+ +
+
+
+

+ Build Something + Amazing +

+

+ Create stunning websites and applications with our modern tools and + cutting-edge technology. Join thousands of developers who trust our platform. +

+
+ + +
+
+
+ 10K+ + Active Users +
+
+ 99.9% + Uptime +
+
+ 24/7 + Support +
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+ ) +} + +export default Hero \ No newline at end of file From 9a73f19fbcdc55a4f74b31d3e981098e428df936 Mon Sep 17 00:00:00 2001 From: "probatai[bot]" <236084945+probatai[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 13:29:39 +0000 Subject: [PATCH 03/14] probat: add activated component probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/eb3e6f3a-1807-4f31-bc98-9814819a0e8a.tsx --- .../eb3e6f3a-1807-4f31-bc98-9814819a0e8a.tsx | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/eb3e6f3a-1807-4f31-bc98-9814819a0e8a.tsx diff --git a/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/eb3e6f3a-1807-4f31-bc98-9814819a0e8a.tsx b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/eb3e6f3a-1807-4f31-bc98-9814819a0e8a.tsx new file mode 100644 index 00000000..bf00979e --- /dev/null +++ b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/eb3e6f3a-1807-4f31-bc98-9814819a0e8a.tsx @@ -0,0 +1,83 @@ +import React from 'react' +import './Hero.css' + +const Hero: React.FC = () => { + return ( +
+ +
+
+
+

+ Build Something + Amazing +

+

+ Create stunning websites and applications with our modern tools and + cutting-edge technology. Join thousands of developers who trust our platform. +

+
+ + +
+
+
+ 10K+ + Active Users +
+
+ 99.9% + Uptime +
+
+ 24/7 + Support +
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+ ) +} + +export default Hero \ No newline at end of file From 8449811c0fb2c530dc30bee8a9abcc287e1b6520 Mon Sep 17 00:00:00 2001 From: "probatai[bot]" <236084945+probatai[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 13:29:45 +0000 Subject: [PATCH 04/14] probat: add activated component probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/cd461870-5e0a-4d1a-af2a-8fdf12ad6dd8.tsx --- .../cd461870-5e0a-4d1a-af2a-8fdf12ad6dd8.tsx | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/cd461870-5e0a-4d1a-af2a-8fdf12ad6dd8.tsx diff --git a/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/cd461870-5e0a-4d1a-af2a-8fdf12ad6dd8.tsx b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/cd461870-5e0a-4d1a-af2a-8fdf12ad6dd8.tsx new file mode 100644 index 00000000..6c9dba91 --- /dev/null +++ b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/cd461870-5e0a-4d1a-af2a-8fdf12ad6dd8.tsx @@ -0,0 +1,83 @@ +import React from 'react' +import './Hero.css' + +const Hero: React.FC = () => { + return ( +
+ +
+
+
+

+ Build Something + Amazing +

+

+ Create stunning websites and applications with our modern tools and + cutting-edge technology. Join thousands of developers who trust our platform. +

+
+ + +
+
+
+ 10K+ + Active Users +
+
+ 99.9% + Uptime +
+
+ 24/7 + Support +
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+ ) +} + +export default Hero \ No newline at end of file From 809b9d44065d41839c7f81a791687d38d5b14ea3 Mon Sep 17 00:00:00 2001 From: "probatai[bot]" <236084945+probatai[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 13:29:50 +0000 Subject: [PATCH 05/14] probat: add activated component probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/dc22eaf7-b085-4b4f-88ab-c74a6970a7af.tsx --- .../dc22eaf7-b085-4b4f-88ab-c74a6970a7af.tsx | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/dc22eaf7-b085-4b4f-88ab-c74a6970a7af.tsx diff --git a/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/dc22eaf7-b085-4b4f-88ab-c74a6970a7af.tsx b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/dc22eaf7-b085-4b4f-88ab-c74a6970a7af.tsx new file mode 100644 index 00000000..7b50d353 --- /dev/null +++ b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/dc22eaf7-b085-4b4f-88ab-c74a6970a7af.tsx @@ -0,0 +1,83 @@ +import React from 'react' +import './Hero.css' + +const Hero: React.FC = () => { + return ( +
+ +
+
+
+

+ Build Something + Amazing +

+

+ Create stunning websites and applications with our modern tools and + cutting-edge technology. Join thousands of developers who trust our platform. +

+
+ + +
+
+
+ 10K+ + Active Users +
+
+ 99.9% + Uptime +
+
+ 24/7 + Support +
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+ ) +} + +export default Hero \ No newline at end of file From cde14bbc6ee49ec4648a55e7269bf7eb77b4c072 Mon Sep 17 00:00:00 2001 From: "probatai[bot]" <236084945+probatai[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 13:29:58 +0000 Subject: [PATCH 06/14] probat: add activated component probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/7a27d50c-7372-4af1-b958-6fedf692036f.tsx --- .../7a27d50c-7372-4af1-b958-6fedf692036f.tsx | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/7a27d50c-7372-4af1-b958-6fedf692036f.tsx diff --git a/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/7a27d50c-7372-4af1-b958-6fedf692036f.tsx b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/7a27d50c-7372-4af1-b958-6fedf692036f.tsx new file mode 100644 index 00000000..2f8505e4 --- /dev/null +++ b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/7a27d50c-7372-4af1-b958-6fedf692036f.tsx @@ -0,0 +1,83 @@ +import React from 'react' +import './Hero.css' + +const Hero: React.FC = () => { + return ( +
+ +
+
+
+

+ Build Something + Amazing +

+

+ Create stunning websites and applications with our modern tools and + cutting-edge technology. Join thousands of developers who trust our platform. +

+
+ + +
+
+
+ 10K+ + Active Users +
+
+ 99.9% + Uptime +
+
+ 24/7 + Support +
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+ ) +} + +export default Hero \ No newline at end of file From 1be71af90272ad32efbfa9da2132ec38b5cb92bc Mon Sep 17 00:00:00 2001 From: "probatai[bot]" <236084945+probatai[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 13:30:08 +0000 Subject: [PATCH 07/14] probat: add activated component probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/8eab0fb6-e06a-4f98-b953-730648874b83.tsx --- .../8eab0fb6-e06a-4f98-b953-730648874b83.tsx | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/8eab0fb6-e06a-4f98-b953-730648874b83.tsx diff --git a/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/8eab0fb6-e06a-4f98-b953-730648874b83.tsx b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/8eab0fb6-e06a-4f98-b953-730648874b83.tsx new file mode 100644 index 00000000..8ab707d4 --- /dev/null +++ b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/8eab0fb6-e06a-4f98-b953-730648874b83.tsx @@ -0,0 +1,83 @@ +import React from 'react' +import './Hero.css' + +const Hero: React.FC = () => { + return ( +
+ +
+
+
+

+ Build Something + Amazing +

+

+ Create stunning websites and applications with our modern tools and + cutting-edge technology. Join thousands of developers who trust our platform. +

+
+ + +
+
+
+ 10K+ + Active Users +
+
+ 99.9% + Uptime +
+
+ 24/7 + Support +
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+ ) +} + +export default Hero \ No newline at end of file From 94c92078de2fca871ed8a52d1d21b9401f8ad074 Mon Sep 17 00:00:00 2001 From: "probatai[bot]" <236084945+probatai[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 13:30:14 +0000 Subject: [PATCH 08/14] probat: add activated component probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/b121f38e-246f-484e-af03-b46e1a419314.tsx --- .../b121f38e-246f-484e-af03-b46e1a419314.tsx | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/b121f38e-246f-484e-af03-b46e1a419314.tsx diff --git a/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/b121f38e-246f-484e-af03-b46e1a419314.tsx b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/b121f38e-246f-484e-af03-b46e1a419314.tsx new file mode 100644 index 00000000..7939eb50 --- /dev/null +++ b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/b121f38e-246f-484e-af03-b46e1a419314.tsx @@ -0,0 +1,83 @@ +import React from 'react' +import './Hero.css' + +const Hero: React.FC = () => { + return ( +
+ +
+
+
+

+ Build Something + Amazing +

+

+ Create stunning websites and applications with our modern tools and + cutting-edge technology. Join thousands of developers who trust our platform. +

+
+ + +
+
+
+ 10K+ + Active Users +
+
+ 99.9% + Uptime +
+
+ 24/7 + Support +
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+ ) +} + +export default Hero \ No newline at end of file From 3a7a8ad740d940e847eb256e348f7f1982ade81f Mon Sep 17 00:00:00 2001 From: "probatai[bot]" <236084945+probatai[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 13:30:20 +0000 Subject: [PATCH 09/14] probat: add activated component probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/8f6a9218-dc3e-46d6-9bfe-0a172143faef.tsx --- .../8f6a9218-dc3e-46d6-9bfe-0a172143faef.tsx | 83 +++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/8f6a9218-dc3e-46d6-9bfe-0a172143faef.tsx diff --git a/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/8f6a9218-dc3e-46d6-9bfe-0a172143faef.tsx b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/8f6a9218-dc3e-46d6-9bfe-0a172143faef.tsx new file mode 100644 index 00000000..d278c0e8 --- /dev/null +++ b/probat/fd2cbb1a-bc48-4729-98c2-6b746d742004/8f6a9218-dc3e-46d6-9bfe-0a172143faef.tsx @@ -0,0 +1,83 @@ +import React from 'react' +import './Hero.css' + +const Hero: React.FC = () => { + return ( +
+ +
+
+
+

+ Build Something + Amazing +

+

+ Create stunning websites and applications with our modern tools and + cutting-edge technology. Join thousands of developers who trust our platform. +

+
+ + +
+
+
+ 10K+ + Active Users +
+
+ 99.9% + Uptime +
+
+ 24/7 + Support +
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+ ) +} + +export default Hero \ No newline at end of file From e15ec81ff815a4b857907fb0a3e23180a6da0526 Mon Sep 17 00:00:00 2001 From: "probatai[bot]" <236084945+probatai[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 13:30:27 +0000 Subject: [PATCH 10/14] Add probat/runtime.tsx --- probat/runtime.tsx | 150 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 probat/runtime.tsx diff --git a/probat/runtime.tsx b/probat/runtime.tsx new file mode 100644 index 00000000..75893550 --- /dev/null +++ b/probat/runtime.tsx @@ -0,0 +1,150 @@ +// probat/runtime.tsx +import * as React from "react"; + +declare global { +interface Window { + __PROBAT_API?: string; +} +} + +const ENV_BASE: string = +(typeof import.meta !== "undefined" && (import.meta as any).env?.VITE_PROBAT_API) || +(typeof process !== "undefined" && (process as any).env?.NEXT_PUBLIC_PROBAT_API) || +(typeof window !== "undefined" && window.__PROBAT_API) || +"https://gushi.onrender.com"; + +const TTL_MS = 6 * 60 * 60 * 1000; // 6 hours +const KEY = (proposalId: string) => `probat_choice_v3:${proposalId}`; + +type RetrieveResponse = { +proposal_id: string; +experiment_id: string | null; +label: string | null; +}; + +type Choice = { +experiment_id: string; +label: string; +ts: number; +}; + +function safeGet(k: string): any | null { +try { + const raw = localStorage.getItem(k); + return raw ? JSON.parse(raw) : null; +} catch { + return null; +} +} +function safeSet(k: string, v: any) { +try { + localStorage.setItem(k, JSON.stringify(v)); +} catch {} +} +function now() { return Date.now(); } +function fresh(ts: number) { return now() - ts <= TTL_MS; } +function readChoice(proposalId: string): Choice | null { +const c = safeGet(KEY(proposalId)) as Choice | null; +return c && fresh(c.ts) ? c : null; +} +function writeChoice(proposalId: string, experiment_id: string, label: string) { +safeSet(KEY(proposalId), { experiment_id, label, ts: now() } as Choice); +} + +async function fetchDecision(baseUrl: string, proposalId: string): Promise<{ experiment_id: string; label: string }> { +const url = `${baseUrl.replace(/\/$/, "")}/retrieve_react_experiment/${encodeURIComponent(proposalId)}`; +const res = await fetch(url, { method: "POST", headers: { Accept: "application/json" } }); +if (!res.ok) throw new Error(`HTTP ${res.status}`); +const data = (await res.json()) as RetrieveResponse; + +const experiment_id = (data.experiment_id || `exp_${proposalId}`).toString(); +const label = data.label && data.label.trim() ? data.label : "control"; + +writeChoice(proposalId, experiment_id, label); +return { experiment_id, label }; +} + +async function sendClickMetric(baseUrl: string, proposalId: string, _experiment_id?: string, variant_label?: string) { +const url = `${baseUrl.replace(/\/$/, "")}/send_metrics/${encodeURIComponent(proposalId)}`; +const body = { + experiment_id: null, + variant_label: variant_label ?? "control", + metric_name: "click", + metric_value: 1, + metric_unit: "count", + source: "react", + dimensions: {}, + captured_at: new Date().toISOString(), +}; +try { + await fetch(url, { + method: "POST", + headers: { Accept: "application/json", "Content-Type": "application/json" }, + body: JSON.stringify(body), + }); +} catch {} +} + +type WithExperimentOpts = { +proposalId: string; +registry: Record>; +}; + +export function withExperiment

( +Control: React.ComponentType

, +opts: WithExperimentOpts +): React.ComponentType

void; probat?: { trackClick: () => void } }> { +const { proposalId, registry } = opts; + +function Wrapped(props: P) { + const [choice, setChoice] = React.useState<{ experiment_id: string; label: string } | null>(null); + + React.useEffect(() => { + let alive = true; + + const cached = readChoice(proposalId); + if (cached) { + setChoice({ experiment_id: cached.experiment_id, label: cached.label }); + } + + if (!cached) { + (async () => { + try { + const { experiment_id, label } = await fetchDecision(ENV_BASE, proposalId); + if (!alive) return; + setChoice({ experiment_id, label }); + } catch (e) { + if (!alive) return; + setChoice({ experiment_id: `exp_${proposalId}`, label: "control" }); + } + })(); + } + + return () => { alive = false; }; + }, [proposalId]); + + const trackClick = React.useCallback(() => { + const exp = choice?.experiment_id; + const lbl = choice?.label ?? "control"; + void sendClickMetric(ENV_BASE, proposalId, exp, lbl); + }, [proposalId, choice?.experiment_id, choice?.label]); + + const label = choice?.label ?? "control"; + const Variant = registry[label] || Control; + + const key = `${proposalId}:${label}`; + return ( +

+ {React.createElement(Variant, { + key, + ...(props as any), + onProbatClick: trackClick, + probat: { trackClick }, + })} +
+ ); +} + +(Wrapped as any).displayName = `withExperiment(${(Control as any).displayName || Control.name || "Component"})`; +return Wrapped as any; +} From 84332c56b250513402785915a51490174fdaa195 Mon Sep 17 00:00:00 2001 From: "probatai[bot]" <236084945+probatai[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 13:30:34 +0000 Subject: [PATCH 11/14] Add probat/index.tsx --- probat/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 probat/index.tsx diff --git a/probat/index.tsx b/probat/index.tsx new file mode 100644 index 00000000..c5493906 --- /dev/null +++ b/probat/index.tsx @@ -0,0 +1,4 @@ +// probat/index.tsx +export { withExperiment } from "./runtime"; +export { PROBAT_REGISTRIES } from "./registry"; +export { PROBAT_COMPONENTS } from "./config"; From f3cc65cce10021f598ecc8071a962ebfbf663f4d Mon Sep 17 00:00:00 2001 From: "probatai[bot]" <236084945+probatai[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 13:30:41 +0000 Subject: [PATCH 12/14] Ensure probat/config.tsx entry --- probat/config.tsx | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 probat/config.tsx diff --git a/probat/config.tsx b/probat/config.tsx new file mode 100644 index 00000000..26f57be3 --- /dev/null +++ b/probat/config.tsx @@ -0,0 +1,4 @@ +// probat/config.tsx +export const PROBAT_COMPONENTS: Record = { + "src/components/Hero.tsx": { proposalId: "fd2cbb1a-bc48-4729-98c2-6b746d742004" } +}; From 4cdcc27da10deda96bbeaa0befebc91416a141fd Mon Sep 17 00:00:00 2001 From: "probatai[bot]" <236084945+probatai[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 13:30:47 +0000 Subject: [PATCH 13/14] Ensure probat/registry.tsx entry --- probat/registry.tsx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 probat/registry.tsx diff --git a/probat/registry.tsx b/probat/registry.tsx new file mode 100644 index 00000000..edebdbf9 --- /dev/null +++ b/probat/registry.tsx @@ -0,0 +1,24 @@ +// probat/registry.tsx + import type React from "react"; + import Exp_0_b from "./fd2cbb1a-bc48-4729-98c2-6b746d742004/cfb29f35-4501-4ffe-bd95-b4498eaf0d97"; +import Exp_1_c from "./fd2cbb1a-bc48-4729-98c2-6b746d742004/a3eeb671-6901-431c-9042-e5b685c0b8b4"; +import Exp_2_d from "./fd2cbb1a-bc48-4729-98c2-6b746d742004/eb3e6f3a-1807-4f31-bc98-9814819a0e8a"; +import Exp_3_e from "./fd2cbb1a-bc48-4729-98c2-6b746d742004/cd461870-5e0a-4d1a-af2a-8fdf12ad6dd8"; +import Exp_4_f from "./fd2cbb1a-bc48-4729-98c2-6b746d742004/dc22eaf7-b085-4b4f-88ab-c74a6970a7af"; +import Exp_5_g from "./fd2cbb1a-bc48-4729-98c2-6b746d742004/7a27d50c-7372-4af1-b958-6fedf692036f"; +import Exp_6_h from "./fd2cbb1a-bc48-4729-98c2-6b746d742004/8eab0fb6-e06a-4f98-b953-730648874b83"; +import Exp_7_i from "./fd2cbb1a-bc48-4729-98c2-6b746d742004/b121f38e-246f-484e-af03-b46e1a419314"; +import Exp_8_j from "./fd2cbb1a-bc48-4729-98c2-6b746d742004/8f6a9218-dc3e-46d6-9bfe-0a172143faef"; + export const PROBAT_REGISTRIES: Record>> = { + "src/components/Hero.tsx": { + "b": Exp_0_b, + "c": Exp_1_c, + "d": Exp_2_d, + "e": Exp_3_e, + "f": Exp_4_f, + "g": Exp_5_g, + "h": Exp_6_h, + "i": Exp_7_i, + "j": Exp_8_j, + }, + }; From b66f028f8e3dc13452450bc1cea6df5c2108122d Mon Sep 17 00:00:00 2001 From: "probatai[bot]" <236084945+probatai[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 13:31:03 +0000 Subject: [PATCH 14/14] probat: auto-edit component to integrate Probat at src/components/Hero.tsx --- src/components/Hero.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/Hero.tsx b/src/components/Hero.tsx index 66d7f27c..5bcab4f7 100644 --- a/src/components/Hero.tsx +++ b/src/components/Hero.tsx @@ -1,6 +1,10 @@ import React from 'react' +import { withExperiment } from "../../probat/runtime"; +import { PROBAT_COMPONENTS, PROBAT_REGISTRIES } from "../../probat/index"; import './Hero.css' +const __PROBAT_KEY__ = "src/components/Hero.tsx"; + const Hero: React.FC = () => { return (
@@ -61,4 +65,11 @@ const Hero: React.FC = () => { ) } -export default Hero +// Probat Generate Lines. +export default (() => { + const meta = PROBAT_COMPONENTS[__PROBAT_KEY__]; + const reg = PROBAT_REGISTRIES[__PROBAT_KEY__] as Record> | undefined; + return (meta?.proposalId && reg) + ? withExperiment(Hero as any, { proposalId: meta.proposalId, registry: reg }) + : Hero; +})();