feat(flow-designer): first-class panel for the time-relative trigger (#1874)#2668
Merged
Conversation
…1874) The start-node inspector gains a "Time-relative (date sweep)" trigger option. Selecting it reveals typed fields for the backend's `config.timeRelative` descriptor (framework #1874) — Sweep object, Date field, Within days, Offset days, Extra filter, Max records — plus the per-record Entry condition. Before this, the descriptor was only authorable via the Advanced (JSON) block. Adds a `numberList` config-field kind: a string-list editor that coerces to `number[]` on commit, so the "Offset days" field emits numbers (matching the backend's strict `z.array(z.number())`) instead of strings. All fields are rooted at the nested `config.timeRelative` block, which the group fully owns (configKeyOf → 'timeRelative'), so the block never leaks into Advanced JSON — same pattern as the approval `escalation.*` fields. Verified in a real browser via the console preview gallery (offline): the panel renders and gates to the time_relative trigger, and the Offset days list editor accepts input. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AHzW68suiFuu6GdJyea8U4
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 18, 2026 16:32
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.
What & why
Companion to framework #1874 / PR #3230, which adds a declarative
time_relativetrigger: a flow whose start node declaresconfig.timeRelativeis swept on a schedule and launched once per record whose date field falls in a window.Before this, that descriptor was only authorable in the flow designer via the start node's Advanced (JSON) block. This PR gives it a first-class typed panel.
Changes
packages/app-shell/.../metadata-admin/inspectors/:flow-node-config.ts— adds a Time-relative (date sweep) option to the start-nodetriggerTypeselect, and, gated to it, typed fields for the descriptor: Sweep object (object reference), Date field, Within days (range mode), Offset days (T-minus mode), Extra filter (key/value), Max records. The per-record Entry condition is available fortime_relativetoo. All fields are rooted at the nestedconfig.timeRelativeblock, which the group fully owns (configKeyOf → 'timeRelative'), so it never double-renders in Advanced JSON — same pattern as the approvalescalation.*fields.FlowNodeConfigField.tsx— adds anumberListconfig-field kind: a string-list editor that coercesstring[] → number[]on commit. So Offset days emits numbers, matching the backend's strictz.array(z.number())— the producer emits the right shape rather than loosening the backend contract.flow-node-config.test.ts— covers the new option, field kinds/paths,time_relativegating, and block ownership.Design note
The descriptor is authorable today without this change (unowned
config.timeRelative→ Advanced JSON), so this is a UX/discoverability improvement, not a functional gap. A larger schema-driven rewrite is not needed: if the automation engine later publishes aconfigSchemafor the start node, the existingjsonSchemaToFlowFieldspath would render it automatically.Testing
flow-node-config.test.ts(13 pass, incl. 4 new). ✅@object-ui/app-shelltype-checkgreen (deps built). ✅preview-gallery.html?only=flow): selecting "Time-relative (date sweep)" on the start node renders all six fields and the Offset days list editor accepts input; the only console noise is the expected offline/api/v1/automation/actionsfallback.Changeset included (
@object-ui/app-shellminor).🤖 Generated with Claude Code
Generated by Claude Code