Skip to content

feat(docs): report demo reliability events to the Thesys console - #1091

Closed
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1787810428-docs-demos-reliability
Closed

feat(docs): report demo reliability events to the Thesys console#1091
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1787810428-docs-demos-reliability

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

What

The docs site demos render LLM-generated UI but drop the OpenUI render/error events on the floor, so the demos produce no reliability signal. This wires @openuidev/observability-cloud (the SDK the reliability docs tell users to install) into the demo routes so their generations show up on the Reliability dashboard.

The integration is a single client component gated on a publishable client API key, so nothing changes — and nothing is sent — unless NEXT_PUBLIC_THESYS_CLIENT_API_KEY is set in the deployment:

// docs/components/reliability-observability.tsx
const apiKey = process.env.NEXT_PUBLIC_THESYS_CLIENT_API_KEY?.trim();
if (!apiKey) return;
Observability.init({ apiKey });   // once per page load, guarded by a module-level flag

Scoped to the demos only (/demos, /demo/github, /chat, /compare) rather than the root layout, so marketing/docs page views don't generate ingest traffic.

Changes

  • Add docs/components/reliability-observability.tsx — env-gated, idempotent Observability.init in a "use client" effect, renders null.
  • Mount it in the four demo layouts: app/demos, app/demo/github, app/chat, app/compare.
  • Add @openuidev/observability-cloud: workspace:^ to docs/package.json (+ lockfile).
  • Document the optional env var in docs/README.md, including the warning not to reuse the server-side THESYS_API_KEY.

Test Plan

  • Verified locally

  • pnpm --filter @openuidev/docs types:check passes.

  • pnpm --filter @openuidev/docs lint and format:check report only pre-existing failures; none of the touched files are flagged.

  • Live ingest was not exercised — I don't have a client API key, so the only path verified is the no-key path (no init, no network calls).

Checklist

  • I linked a related issue, if applicable
  • I updated docs/README when needed
  • I considered backwards compatibility

Link to Devin session: https://app.devin.ai/sessions/90646844560e454baad6b15c63417ec1
Open in Devin Desktop: https://app.devin.ai/desktop/session/90646844560e454baad6b15c63417ec1?variant=devin
Requested by: @zahlekhan

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openui-docs Ready Ready Preview Aug 27, 2026 6:05am

Request Review

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.

1 participant