Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: CopilotKit/OpenGenerativeUI
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: feat/use-cpk-open-generative-ui
Choose a base ref
...
head repository: CopilotKit/OpenGenerativeUI
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 15 commits
  • 80 files changed
  • 4 contributors

Commits on May 15, 2026

  1. Harden CI: SHA-pin all actions, add persist-credentials: false

    - SHA-pin actions/checkout, actions/setup-node, pnpm/action-setup,
      and slackapi/slack-github-action to immutable commit SHAs
    - Add persist-credentials: false to all checkout steps to limit
      token exposure in a public repo
    - Add top-level permissions: contents: read to enforce least
      privilege
    jpr5 committed May 15, 2026
    Configuration menu
    Copy the full SHA
    7df6f99 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #83 from CopilotKit/fix/ci-hardening

    Harden CI: SHA-pin all actions, add persist-credentials: false
    jpr5 authored May 15, 2026
    Configuration menu
    Copy the full SHA
    cc79841 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2026

  1. Phase 0+A1: test infra, CopilotKit 1.55.2-next.1, single-source desig…

    …n system
    
    - Add vitest (apps/app jsdom, apps/mcp node) + pytest (apps/agent) + turbo test task
    - Pin @copilotkit/{react-core,react-ui,runtime} to 1.55.2-next.1 (canonical
      OpenGenerativeUI rails: generateSandboxedUi, OpenGenerativeUIMiddleware)
    - New @repo/design-system package single-sources THEME_CSS / SVG_CLASSES_CSS /
      FORM_STYLES_CSS / importmap; apps/app and apps/mcp now consume it, killing
      the "keep in sync" fork in apps/mcp/src/renderer.ts (plan acceptance #4,
      enforced by a repo-scan test)
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    jerelvelarde and claude committed Jun 10, 2026
    Configuration menu
    Copy the full SHA
    6069b18 View commit details
    Browse the repository at this point in the history
  2. Phase A2: migrate demo onto canonical generateSandboxedUi rails

    - CopilotRuntime now sets openGenerativeUI: true (auto-applies
      OpenGenerativeUIMiddleware; options extracted to a tested builder)
    - Demo-owned activity renderer for "open-generative-ui" events overrides the
      built-in via renderActivityMessages: keeps CSS-first gating + adds design
      system & importmap injection, idiomorph preview morphing, and continuous
      ResizeObserver autosize (demo non-regressions)
    - Zod-validated sandboxFunctions: sendPrompt (chat bridge via CustomEvent +
      OpenGenUIPromptBridge) and openLink (https-only + optional origin allowlist)
    - OPEN_GEN_UI_DESIGN_SKILL replaces the default shadcn designSkill
    - Python agent prompt contract switched widgetRenderer -> generateSandboxedUi
      (ordered params, css-first, Websandbox.connection.remote bridge, dynamic
      imports), protocol & quality bar preserved; prompt hoisted to src/prompt.py
    - 60 app tests + 15 design-system tests + 8 pytest, all red-green
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    jerelvelarde and claude committed Jun 10, 2026
    Configuration menu
    Copy the full SHA
    5ad492f View commit details
    Browse the repository at this point in the history
  3. Phase A3+A4: retire legacy widgetRenderer rail; skills on procedural …

    …channel
    
    A3 (apps/app):
    - Delete widget-renderer.tsx and its useComponent registration; guard test
      pins zero widgetRenderer/widget-renderer references in src
    - Export overlay now rides the canonical activity content via
      assembleStandaloneHtmlFromActivity (importmap -> design system -> css ->
      Websandbox stub -> html -> jsFunctions/jsExpressions)
    - Legacy open-link postMessage handler hardened via isAllowedLinkUrl
    - template-card imports THEME_CSS from @repo/design-system
    
    A4 (apps/agent):
    - All three SKILL.md files rewritten to generateSandboxedUi ordered contract:
      css-first reveal, jsFunctions toolbox + jsExpressions stepwise invocations,
      parameterized generators for one-expression refinement turns, Websandbox
      bridge calls, dynamic-import library guidance; quality bar preserved
    - 17 new pytest contract tests (red-green); 25 total green
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    jerelvelarde and claude committed Jun 10, 2026
    Configuration menu
    Copy the full SHA
    4e70546 View commit details
    Browse the repository at this point in the history
  4. Review pass: fix sandbox-destroying remount, export fidelity, CSP, CI…

    … wiring
    
    Adversarial review of the full migration diff (6 lenses, 12 confirmed
    critical/major findings, all fixed red-green):
    
    - ExportOverlay now always wraps the renderer (ready={isComplete}) — the
      conditional wrap remounted the container at completion and destroyed the
      live final sandbox iframe
    - Exported standalone HTML emits one classic script (jsFunctions as globals,
      matching live sandbox.run semantics; expressions in an async IIFE) and
      escapes </style> in generated css
    - Legacy four-CDN CSP meta restored on the final sandbox frame
    - prompt.py + skills no longer teach top-level await in jsFunctions /
      jsExpressions (classic-script semantics; snippets wrapped in async fns)
    - Seed templates use the Websandbox bridge form; apply_template appends a
      canonical-translation usage note
    - Vestigial unvalidated open-link postMessage handler removed from page.tsx
    - turbo lint/test dependsOn ^build; CI now runs pnpm test + new pytest job
    - Dockerfile.app + render.yaml build @repo/design-system before the app
    - README + docs/generative-ui.md rewritten to the canonical rails
    - New coverage: process-partial-html (12), seed-templates, MCP renderer,
      resize clamping/non-finite guard, morph-enter entrance parity
    
    Suites: 97 app + 15 design-system + 4 mcp vitest, 32 pytest — all green.
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    jerelvelarde and claude committed Jun 10, 2026
    Configuration menu
    Copy the full SHA
    542dae1 View commit details
    Browse the repository at this point in the history
  5. Switch agent model to Anthropic Claude Fable 5

    - New src/model.py factory: ChatAnthropic, default claude-fable-5,
      LLM_MODEL env override preserved (red-green tested)
    - Drop langchain-openai + openai deps; add langchain-anthropic
    - ANTHROPIC_API_KEY replaces OPENAI_API_KEY everywhere: render.yaml,
      Makefile, README, CONTRIBUTING, CLAUDE.md, docs (getting-started,
      deployment, bring-to-your-app, agent-state, agent-tools)
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    jerelvelarde and claude committed Jun 10, 2026
    Configuration menu
    Copy the full SHA
    75d401b View commit details
    Browse the repository at this point in the history
  6. Update .env.example for the Anthropic Claude switch

    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    jerelvelarde and claude committed Jun 10, 2026
    Configuration menu
    Copy the full SHA
    a264f3a View commit details
    Browse the repository at this point in the history
  7. Live-run fixes: middleware interop, Anthropic message rules, build loop

    Found by running the airplane acceptance prompt live on Fable 5 (all
    red-green tested, 44 pytest green):
    
    - Bump copilotkit 0.1.78 -> 0.1.94 + ag-ui-langgraph -> >=0.0.38: 0.1.78's
      CopilotKitMiddleware crashes (TypeError) serializing the AG-UI Context
      pydantic models the canonical frontend now sends as agent context
    - New src/anthropic_compat.py ConsecutiveSystemMessagesMiddleware:
      (1) reorders the middleware's "App Context" SystemMessage (appended after
      the human turn by the add_messages reducer) to the head — Anthropic rejects
      non-consecutive system messages; (2) repairs streamed zero-length thinking
      blocks missing the "thinking" field, which Anthropic 400s on tool-loop
      replay
    - Prompt: generateSandboxedUi at most once per request — the followUp run
      returning "UI generated" caused Fable to rebuild the widget in a loop
      (observed 5+ rebuilds; legacy useComponent rail had no followUp runs)
    - .claude/launch.json for the preview server
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    jerelvelarde and claude committed Jun 10, 2026
    Configuration menu
    Copy the full SHA
    6bee351 View commit details
    Browse the repository at this point in the history
  8. Fix truncated widget generation: raise model max_tokens to 64000

    Root cause of the blank 3D canvas: langchain-anthropic's default
    max_tokens (4096) truncated generateSandboxedUi tool args mid-stream —
    css and html arrived but jsFunctions/jsExpressions were cut off, so the
    middleware never emitted htmlComplete and the renderer never left its
    preview sandbox (no final sandbox, no JS execution, no autosize). The
    same truncation caused the earlier rebuild loop: each followUp turn saw
    its own amputated tool call.
    
    Diagnosed by replaying the exact streaming delta sequence against the
    real renderer (passed — renderer was sound) and then extracting the live
    activity content via React fiber: keys stopped at html with no
    htmlComplete. Verified fixed live: full 19KB final frame, continuous
    resize reports, working Three.js airplane with pitch/yaw/roll controls.
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    jerelvelarde and claude committed Jun 10, 2026
    Configuration menu
    Copy the full SHA
    30be769 View commit details
    Browse the repository at this point in the history
  9. Add OpenAI fallback: gpt-* LLM_MODEL names route to ChatOpenAI

    Production safety net for the Fable 5 cutover: flipping LLM_MODEL to a
    gpt-* name in the Render dashboard falls back to OpenAI without a code
    change. OPENAI_API_KEY re-declared in render.yaml (sync: false) so the
    existing dashboard value survives blueprint sync.
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    jerelvelarde and claude committed Jun 10, 2026
    Configuration menu
    Copy the full SHA
    e54c1ff View commit details
    Browse the repository at this point in the history
  10. Make @repo/app build self-sufficient: build design-system first

    The Render service's dashboard build command (pre-blueprint-sync) runs
    plain `pnpm --filter @repo/app build`, which does not build workspace
    dependencies — @repo/design-system dist/ is missing and next build dies
    with Module not found. Building the dependency inside the app's build
    script makes every invocation path work: turbo (^build, now redundant
    but cheap), the render.yaml buildCommand, the stale dashboard command,
    and Dockerfile.app.
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    jerelvelarde and claude committed Jun 10, 2026
    Configuration menu
    Copy the full SHA
    2152aa8 View commit details
    Browse the repository at this point in the history
  11. Merge pull request #85 from CopilotKit/jerel/cranky-kalam-f06e99

    Plan A: migrate demo onto canonical generateSandboxedUi rails (Fable 5)
    jerelvelarde authored Jun 10, 2026
    Configuration menu
    Copy the full SHA
    53720d6 View commit details
    Browse the repository at this point in the history
  12. Pin deployed agent model to gpt-5.4

    Sets LLM_MODEL for the Render agent service to gpt-5.4-2026-03-05,
    using the provider routing in apps/agent/src/model.py (gpt-* names
    use the OpenAI client).
    
    Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
    jerelvelarde and claude committed Jun 10, 2026
    Configuration menu
    Copy the full SHA
    5d25f62 View commit details
    Browse the repository at this point in the history
  13. Merge pull request #86 from CopilotKit/hotfix/prod-llm-model-gpt

    Pin deployed agent model to gpt-5.4
    jerelvelarde authored Jun 10, 2026
    Configuration menu
    Copy the full SHA
    457e60c View commit details
    Browse the repository at this point in the history
Loading