Seed the run form from the input schema's defaults - #13
Merged
Conversation
The run panel opened on `{}` and made you retype the same owner/repo every
time. `default-input.ts` turns a script's declared input schema into the
form's starting payload — a root-level `default` wins, otherwise each
property that declares one contributes, and properties without a default
are left out rather than invented.
Nothing enforces those defaults, so the upsert route's prose and the
`input` parameter's description now ask authors to supply them; that text
reaches script-writing agents through the generated MCP tool, which
`mcp.test.ts` pins. `JsonSchema` gains a `default` field so the stored
schema carries it verbatim.
Co-Authored-By: Claude <noreply@anthropic.com>
Defaults belong in the script body (e.g. `input.limit ?? 25`), not on JSON Schema properties. Drop the schema-default seeding path so the run form stays on an empty payload that those internal fallbacks can satisfy. Co-authored-by: Cursor <cursoragent@cursor.com>
Ask upsert authors to embed `default` on input properties, and fill required fields without one with type-shaped placeholders so Run always starts from a complete payload. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The run panel opened on
{}, so running a script meant retyping the same owner/repo every time.apps/frontend/src/components/scripts/default-input.tsnow builds the form's starting payload from the script's declared input schema — a root-leveldefaultwins, otherwise each property that declares one contributes, and properties without a default are left out rather than invented.Nothing enforces those defaults, so the upsert route's prose and its
inputparameter description now ask authors to supply them; that text reaches script-writing agents through the generated MCP tool, whichmcp.test.tspins.JsonSchemagains adefaultfield so the stored schema carries it verbatim, and the frontend fixtures grow defaults so Storybook shows the seeded form.🤖 Generated with Claude Code