feat(flows): collect input variables before running an input-driven flow#71
Merged
Merged
Conversation
Flows with `isInput` variables (e.g. lead_conversion's leadId / createOpportunity
/ opportunityName / opportunityAmount) previously triggered with an empty
context. Now the Run button opens a param-collection dialog for those flows;
field-less flows keep the simple confirm.
- FlowRunDialog renders a FieldRenderer per input variable (typed: text/toggle/
number/date…), collects values, normalizes date/datetime to ISO-8601, and
hands back a params object.
- Flow detail routes Run → dialog when inputs exist, else confirm; both call the
shared runFlow(). Collected values are sent as `{ params: { <var>: value } }`,
matching the engine's `context.params[varName]` binding.
- camelCase variable names are humanized for labels (opportunityName → "Opportunity Name").
Verified in-browser against the local 7.5.0 server: Run on lead_conversion opens
the dialog with all 4 typed inputs; filling them and running posts
`{"params":{"leadId":"lead-123","opportunityName":"Acme Renewal"}}`. Adds
FlowRunDialog tests; typecheck + lint clean; full suite green (1164 passed).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.
Summary
Flows that declare
isInputvariables (e.g.lead_conversion's leadId / createOpportunity / opportunityName / opportunityAmount) previously triggered with an empty context. Now Run opens a param-collection dialog for those flows; field-less flows keep the simple confirm.FlowRunDialogrenders aFieldRendererper input variable (typed — text/toggle/number/date…), collects values, normalizesdate/datetimeto ISO-8601, and hands back a params object.runFlow(). Collected values are sent as{ params: { <var>: value } }, matching the engine'scontext.params[varName]binding.opportunityName→ "Opportunity Name").Verification
lead_conversionopens the dialog with all 4 typed inputs (text + a boolean toggle); filling them and running posts exactly{"params":{"leadId":"lead-123","opportunityName":"Acme Renewal"}}(captured request body).FlowRunDialogtests;tsc+eslintclean; full suite green (1164 passed).🤖 Generated with Claude Code