Skip to content

probat: activate and auto-wrap src/components/Hero.tsx (proposal 1db9df23) - #1

Open
probatai[bot] wants to merge 15 commits into
mainfrom
probat_1db9df23-c7ca-4395-b929-65aa26949c93
Open

probat: activate and auto-wrap src/components/Hero.tsx (proposal 1db9df23)#1
probatai[bot] wants to merge 15 commits into
mainfrom
probat_1db9df23-c7ca-4395-b929-65aa26949c93

Conversation

@probatai

@probatai probatai Bot commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

This PR fully activates Probat for the target component.

✅ What this PR does

  • Downloads and commits accepted variant components under probat/{proposal_id}/.
  • Ensures probat/runtime.tsx, probat/index.tsx, probat/config.tsx, and probat/registry.tsx are up to date.
  • Auto-edits the component src/components/Hero.tsx to add imports, define __PROBAT_KEY__, and wrap the default export with withExperiment(...).

🧩 How the component is wired (shape)

import { withExperiment } from "probat/runtime";
import { PROBAT_COMPONENTS, PROBAT_REGISTRIES } from "probat";
const __PROBAT_KEY__ = "src/components/Hero.tsx";
// ... existing component definition ...
export default (() => {
  const meta = PROBAT_COMPONENTS[__PROBAT_KEY__];
  const reg  = PROBAT_REGISTRIES[__PROBAT_KEY__] as Record<string, React.ComponentType<any>> | undefined;
  return (meta?.proposalId && reg)
    ? withExperiment<any>(/* NamedComponent */ as any, { proposalId: meta.proposalId, registry: reg })
    : /* NamedComponent */;
})();

🧠 Notes

  • Decision API base can be overridden via window.__PROBAT_API, VITE_PROBAT_API, or NEXT_PUBLIC_PROBAT_API.
  • Decisions cache for 6 hours in localStorage under probat_choice_v2.

probatai Bot added 15 commits November 6, 2025 09:31
…949c93/0c07ddee-e9d0-405b-9119-145c0d19a527.tsx
…949c93/c0fc681c-f985-481f-adc0-52bb28382da7.tsx
…949c93/17a93140-b922-4fee-92cc-1a91362712c6.tsx
…949c93/1e4a9571-c221-44da-a30f-5ff6b38abecd.tsx
…949c93/2a340853-6b6b-47a0-abbc-9a527d1c6741.tsx
…949c93/8f21c2a2-5e86-4f16-89a3-72a22d59a8eb.tsx
…949c93/984e4b19-c412-4aec-bb5b-3c214a8c23e9.tsx
…949c93/f3e7d614-bb8d-4b34-b2a9-a7c0d4f00394.tsx
…949c93/e39bfa6b-caa7-4aa7-a1cc-debe8753743e.tsx
…949c93/51840ed1-40c6-4cbd-ba33-f7ec7b53f560.tsx
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.

0 participants