Repository navigation
Display valid multi-day automation schedules - #26850
Merged
Merged
Conversation
Co-authored-by: ggbdpq <ggbdpq@gmail.com>
nwparker
marked this pull request as ready for review
October 9, 2026 11:43
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 13 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (6)
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 |
7 of 9 tasks
7 of 9 tasks
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.
ELI5
A valid automation that runs on several weekdays now displays its schedule instead of “Invalid schedule.”
What Changed
Use the scheduler's existing validator before describing a rule. Keep friendly labels for the existing presets and show the stored RRULE for valid combinations without a preset label, such as Tuesday/Thursday/Saturday. Invalid rules still show the invalid label. The renderer uses the same description.
Why
The preset editor recognizes fewer rules than the scheduler supports. Reusing canonical validation avoids another parser and keeps run times unchanged. The raw display fallback reuses the existing terminal-control escaping so an accepted custom field cannot inject controls into CLI list output.
Adapted from @ggbdpq's #25002, with canonical next-occurrence checks and safe display handling added.
Linked Issue
Fixes #24985
Visual Proof
Actual hidden Electron Automations row, same disabled fixture before and after. Before: “Invalid schedule.” After: the valid RRULE, truncated by the existing cell with the full expression in its title. The fixture was deleted after validation. No test window was revealed.
Testing
Baseline: three valid weekly rules fail the actual formatter/renderer assertions. Fixed: 90 tests across seven schedule, canonical cron, editing, locale and orchestration suites pass. An independent review swept 762 weekly combinations and checked invalid controls. The final control-byte review passed 87 focused CLI/renderer/orchestration tests (overlap, not added to the 90) and verified extracted escaping retains its previous behavior.
All typecheck projects (
pnpm tc), changed-code quality, formatter and whitespace checks pass. macOS hidden CDP validates the actual Automation row. The same seven canonical suites passed on native Linux (90 tests) and Windows (88 tests plus two existing platform-guarded DST cases skipped) at the exact reviewed commit, with frozen dependencies and Vitest 5.0.3. These are formatter, scheduler and terminal-escaping portability checks; rendered UI and live SSH were not run on those hosts.Full CI passed all five unit shards, static analysis/typecheck, relay integration, Linux/Windows packaging and aggregate verification at the reviewed commit. The initial unit run timed out in an unchanged Codex connection test; its 34 cases passed locally with CI’s Bun version, and the failed job passed on retry without source changes. Ready-event checks also completed with no failures or pending jobs; the PR is ready for review. Nothing has been merged.
AI Disclosure
Review
Independent review found and resolved a raw terminal-control fallback. Final review is clean. Canonical scheduler acceptance, persistence, run times and existing friendly labels are unchanged.
Agent skill upstream boundary
Notes
The same shared formatter serves CLI output and the localized desktop description. Formatting does not feed back into schedule parsing or stored expressions. No host transport or workspace assumptions added.
Checklist