Skip to content

probat: activate and auto-wrap src/components/Hero.tsx (proposal 6e929522) - #3

Open
probatai[bot] wants to merge 15 commits into
mainfrom
probat_6e929522-333a-4a43-b822-4927dd894f8c
Open

probat: activate and auto-wrap src/components/Hero.tsx (proposal 6e929522)#3
probatai[bot] wants to merge 15 commits into
mainfrom
probat_6e929522-333a-4a43-b822-4927dd894f8c

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 14:34
…894f8c/a02f30b6-48d2-47ca-9006-c65203989a59.tsx
…894f8c/acad765c-6b86-47c7-96f2-bc9a7fad4578.tsx
…894f8c/c998493b-6d28-428f-9266-53959fe68550.tsx
…894f8c/e69357f0-d93b-464b-8f11-7a8e111a3267.tsx
…894f8c/f8f68bc8-a7f1-40f2-bd74-d23ca064d1e1.tsx
…894f8c/f88fecb7-9105-4ab6-ac4c-408308c4d32b.tsx
…894f8c/e23b3962-c657-4819-8921-565756603a25.tsx
…894f8c/f9b4e04c-badc-4168-9a88-8b3e9255e1b9.tsx
…894f8c/0aec55fd-21c6-46d4-918d-21089e7c9b86.tsx
…894f8c/a3cd35cd-f444-4a70-9072-9d81e482de2f.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