Skip to content

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

Open
probatai[bot] wants to merge 14 commits into
mainfrom
probat_fd2cbb1a-bc48-4729-98c2-6b746d742004
Open

probat: activate and auto-wrap src/components/Hero.tsx (proposal fd2cbb1a)#2
probatai[bot] wants to merge 14 commits into
mainfrom
probat_fd2cbb1a-bc48-4729-98c2-6b746d742004

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 14 commits November 6, 2025 13:29
…742004/cfb29f35-4501-4ffe-bd95-b4498eaf0d97.tsx
…742004/a3eeb671-6901-431c-9042-e5b685c0b8b4.tsx
…742004/eb3e6f3a-1807-4f31-bc98-9814819a0e8a.tsx
…742004/cd461870-5e0a-4d1a-af2a-8fdf12ad6dd8.tsx
…742004/dc22eaf7-b085-4b4f-88ab-c74a6970a7af.tsx
…742004/7a27d50c-7372-4af1-b958-6fedf692036f.tsx
…742004/8eab0fb6-e06a-4f98-b953-730648874b83.tsx
…742004/b121f38e-246f-484e-af03-b46e1a419314.tsx
…742004/8f6a9218-dc3e-46d6-9bfe-0a172143faef.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