fix(flow-designer): author the canonical config.schedule the runtime reads#2671
Merged
Conversation
…reads The start-node inspector's "Cron schedule" field wrote a flat `config.cron`, but the automation runtime (resolveTriggerBinding → normalizeSchedule) only reads `config.schedule` — so a scheduled flow authored in the designer silently never bound and never fired. - flow-node-config.ts: replace the dead `config.cron` field with a `config.schedule.expression` field. `fallbackPath: ['config','cron']` surfaces and migrates the legacy flat key on first edit; reading `.expression` renders an object-shaped `config.schedule` as its cron string instead of "[object Object]". Drops the legacy bare-string `config.schedule` text field (which printed the object shape as "[object Object]"). Field is also offered for the time_relative sweep cadence. - FlowCanvas.tsx: the node-card summary reads the nested config.schedule.expression (and config.timeRelative.object) so an object-shaped descriptor summarizes as its value, not "[object Object]". - tests: cover the new field's path/fallback, object-shape read, config.cron migration read, gating, and removal of the raw config.schedule field. Browser-verified via the console preview gallery: the sample flow's flat config.cron '0 9 * * *' now surfaces in the Cron schedule field; no "[object Object]"; zero JS errors. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AHzW68suiFuu6GdJyea8U4
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 19, 2026 07:04
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 bug
The flow designer's start-node "Cron schedule" field wrote a flat
config.cronstring. But the automation runtime (resolveTriggerBinding→normalizeSchedule, in framework@objectstack/service-automation/@objectstack/trigger-schedule) only ever readsconfig.schedule— there is noconfig.cron→config.scheduleconversion anywhere. So ascheduleflow authored in the designer gotconfig.cron, which the backend ignored →normalizeSchedule(undefined)→ the flow silently never bound and never fired.A second, related glitch: a code-authored object-shaped
config.schedule({ type: 'cron', expression }) rendered as "[object Object]" in the legacy bare-string text field.(Found while adding the time-relative trigger panel; adjacent, pre-existing.)
The fix
packages/app-shell/.../metadata-admin/:inspectors/flow-node-config.ts— replace the deadconfig.cronfield with aconfig.schedule.expressionfield (the canonical shapenormalizeSchedulereads; it inferscronfromexpression, and any runtime-settype/timezoneare preserved through edits sincesetAtPathmerges).fallbackPath: ['config','cron']surfaces and migrates an existing flatconfig.cronon first edit. Reading.expressionrenders an object-shaped schedule as its cron string, not "[object Object]". Drops the legacy bare-stringconfig.scheduletext field (which was the source of the "[object Object]" render). The field is also offered for thetime_relativesweep cadence.previews/FlowCanvas.tsx— the node-card summary reads the nestedconfig.schedule.expression(andconfig.timeRelative.object), so an object-shaped descriptor summarizes as its value.inspectors/flow-node-config.test.ts— covers the field path/fallback, object-shape read,config.cronmigration read, gating, and removal of the rawconfig.schedulefield.Contract-first: the fix is on the producer (the designer authors the shape the runtime reads) — no lenient
config.cronfallback was added to the backend consumer.Testing
flow-node-config.test.ts— 18 pass (5 new). ✅@object-ui/app-shelltype-checkgreen; ESLint clean (0 errors). ✅config.cron: '0 9 * * *'now surfaces in the Cron schedule field (ready to migrate on edit); no "[object Object]"; zero JS errors.Changeset included (
@object-ui/app-shellpatch).🤖 Generated with Claude Code
Generated by Claude Code