Skip to content

docs: fix GitHub demo 500 by reading the playground LibrarySpec - #1220

Closed
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1790061142-fix-github-demo-500
Closed

devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1790061142-fix-github-demo-500

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

What

openui.com/demo/github returns Error: Server error 500 on every generation. The route crashes at module init: generatePrompt() throws Cannot convert undefined or null to object on Object.values(spec.components).

Root cause: the route read generated/playground-component-spec.json, which is produced by openui generate --json-schema. Since #1095 regenerated it, that flag emits a raw JSON Schema ({ $schema, type, properties, $defs }) instead of a PromptSpec-shaped object, so spec.components is undefined.

Changes

  • Read generated/playground-system-prompt.spec.json (the LibrarySpec sidecar the playground prompt step already emits: { root, components, componentGroups, schema }) instead.
  • Remove the --json-schema step from generate:prompts and delete the stale playground-component-spec.json, so there is a single source for the playground spec.

Test Plan

  • Verified locally: generatePrompt({...spec, tools, editMode, ...}) throws with the old file and produces a 28.9k-char prompt with the new file.
  • prettier --check and eslint clean on changed files.
  • Reproduced the 500 on prod (POST /api/demo/github/stream returns empty 500; /api/playground/stream reaches OpenRouter fine, so the key/env is not the issue).

Checklist

  • I considered backwards compatibility (no public API change; internal generated asset only)

Link to Devin session: https://app.devin.ai/sessions/ad40852cdb2f4b2495d98767eed82628
Open in Devin Desktop: https://app.devin.ai/desktop/session/ad40852cdb2f4b2495d98767eed82628?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

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@vercel

vercel Bot commented Sep 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
openui-docs Ready Ready Preview Sep 22, 2026 7:14am UTC

Request Review

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

Superseded by #1222, which switched the route to playground-library.spec.json + generateSystemPrompt. Prod /api/demo/github/stream now returns 200.

This branch was successfully deployed

1 active deployment
Preview 6c19c84c Deployed Sep 22, 2026 by vercel[bot]
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