Repository navigation
feat(web): SchemaForm, a form generated from a JSON Schema with a variable picker - #566
Merged
Merged
Conversation
…}} variable picker
The studio's action cards and the canvas's action node settings render an
action's params from the actions catalog's JSON Schema: text, template,
number, choice, toggle, list and JSON fields, labels and hints from the
schema, a variable picker on {{ and a preview line per field.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AjJqXgjj1cNdKGRQbX5frb
Merged
19 of 23 tasks
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.
Requested by Adeel · project thread
Description
Before: nothing in the web app could draw a form from a JSON Schema, so the studio had no way to show an automation action's settings.
After:
SchemaForm(components/forms/schema-form.tsx) draws a form from a JSON Schema object, such as an action's params fromGET /api/v1/automations/actions. Each property gets the control its type needs: one-line text, a template box (prompts and long text), number, choice (enum, with its default named), toggle, list (one item a line) and JSON object. Labels come fromtitleand hints fromdescription. A field that takes a template accepts{{ }}for any type, as the backend'scheck_paramsdoes. Typing{{opens a variable picker when variables are passed in (arrow keys move, Enter, Tab or a click puts the variable in, Esc closes). Apreviewline can go under each field, and the API's problems show next to their fields.Nothing uses it yet. The next studio PRs (the canvas's action node and the builder's action cards, M11) render with it.
Motivation and Context
Workflow studio M11 (Studio UI), Build step 2: "one reusable
SchemaFormcomponent: text, number, choice, toggle, list, and template fields". The canvas (step 6) uses it too. The pure part (schema-model.ts: field kinds, reading typed text as a value, problems, where a{{is being typed) is kept apart so the builder's own tests can use it.Types of changes
!in the title)Checklist:
make hookschecks it on commit).__tests__/schema-form.test.tsx, 9 tests).docs/automations.mdcomes with the builder.Local CI (
ci/local-ci.sh HEAD --jobs frontend,pre-commit,title): Next.js pass, pre-commit pass, PR title pass.Done questions (AGENTS.md)
Field,Input,Textarea,SelectandCheckboxcontrols. A JSON Schema form library (react-jsonschema-form) would add a large dependency for seven field kinds.Generated by Claude Code