Skip to content

feat(flows): collect input variables before running an input-driven flow#71

Merged
xuyushun441-sys merged 1 commit into
mainfrom
feat/flow-input-collection
Jun 2, 2026
Merged

feat(flows): collect input variables before running an input-driven flow#71
xuyushun441-sys merged 1 commit into
mainfrom
feat/flow-input-collection

Conversation

@xuyushun441-sys
Copy link
Copy Markdown
Contributor

Summary

Flows that declare isInput variables (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.

  • 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").

Verification

  • ✅ In-browser against the local 7.5.0 server: Run on lead_conversion opens 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).
  • ✅ New FlowRunDialog tests; tsc + eslint clean; full suite green (1164 passed).

🤖 Generated with Claude Code

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>
@xuyushun441-sys xuyushun441-sys merged commit ac69c0e into main Jun 2, 2026
1 of 4 checks passed
@xuyushun441-sys xuyushun441-sys deleted the feat/flow-input-collection branch June 2, 2026 00:27
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.

2 participants