feat(frontend): render cron elicitation fields with the schedule builder - #5228
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughCron is added as a supported ChangesCron format support
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant RequestInput
participant FormatNormalizer
participant SchemaForm
participant ScheduleBuilderField
RequestInput->>FormatNormalizer: Provide cron or crontab format
FormatNormalizer->>SchemaForm: Normalize format to cron
SchemaForm->>ScheduleBuilderField: Render cron value with initial default
ScheduleBuilderField-->>SchemaForm: Return updated cron expression
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
format: "cron" (alias "crontab") joins the elicitation format vocabulary. SchemaForm renders it with the playground's ScheduleBuilderField instead of a raw text input, and the stepper review row humanizes the value via describeBuilder. Catalog description, golden fixture, playbook docs and tests pin the new format on both sides of the wire.
3d3c253 to
8ec3df3
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 4c6f6f78-8b3c-43a9-8758-697dfccde10c
📒 Files selected for processing (8)
.agents/skills/write-template-playbooks/references/prompting-checklist.mdapi/oss/src/core/workflows/static_catalog.pyapi/oss/tests/pytest/unit/workflows/test_static_catalog.pydocs/design/agent-workflows/projects/agent-templates/playbook-spec.mdweb/packages/agenta-entity-ui/src/gatewayTool/components/SchemaForm.tsxweb/packages/agenta-shared/src/utils/elicitation.tsweb/packages/agenta-shared/tests/fixtures/elicitation_request.jsonweb/packages/agenta-shared/tests/unit/elicitation.test.ts
… displays ScheduleBuilderField has no empty state, so a cron field without a wire default looked answered while the form value stayed undefined — a required field kept Accept disabled with no visible way to confirm the shown schedule, and an optional one silently submitted nothing. cronInitialValue seeds the displayed schedule as the value (WYSIWYG); the CronField fallback now only covers post-mount clears (stepper Skip).
|
@coderabbitai review |
✅ Action performedReview finished.
|
What
Adds
format: "cron"(aliascrontab) to the elicitation format vocabulary, so an agent asking for a recurring schedule viarequest_inputgets the playground's friendly schedule builder instead of a raw text input.Why
The schedule-creation drawer already has a vetted builder UI (
ScheduleBuilderField: frequency, day, time — serialized as a 5-field cron expression). Until now, a chat elicitation asking "when should this run?" fell back to a plain string field, forcing the user to hand-write cron. This wires the existing control into the elicitation renderer — same pattern asdate/multiline, gated behind theformatsflag.How
@agenta/sharedelicitation.ts—cronjoinsKNOWN_STRING_FORMATS;crontabcanonicalizes to it.SchemaForm.tsx— thecronformat case rendersScheduleBuilderField(same-package import fromgatewayTrigger/drawers); the stepper review row humanizes the value viadescribeBuilder(cronToBuilder(value).state)with a raw-value fallback.static_catalog.py— therequest_inputtool description teaches the new format ("renders a friendly schedule builder; the value is a 5-field cron expression").run_schedulecron field with a default; the catalog pytest asserts the golden exercises it; vitest pins thecron/crontabnormalization; playbook-spec + prompting-checklist format lists updated.Verification
@agenta/shared275 vitest ✓,@agenta/entity-ui185 vitest ✓, turbo build ✓test_static_catalog.py41 passed ✓, ruff format/check ✓