Skip to content

Display valid multi-day automation schedules - #26850

Merged
nwparker merged 1 commit into
mainfrom
nwparker/obvious-schedule-labels-10-09
Oct 10, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/obvious-schedule-labels-10-09

Conversation

@nwparker

@nwparker nwparker commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​55 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​55
Prod 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​35 $\color{#cf222e}{\Huge{\mathbf{−}}}$​17 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​18

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.

Before After
Valid rule incorrectly labelled invalid Valid rule displayed

Testing

  • I manually tested these changes locally
  • Automated tests added/updated

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

  • Not applicable; no skill content changed.

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

  • Small and focused
  • User-facing before/after, mechanism and approach explained
  • Before/after proof attached
  • Reviewed for correctness, security and performance
  • Cross-platform, SSH, folder workspace and compatibility considered
  • Focused tests, typecheck and changed-code quality pass; full build and tests left to CI

Co-authored-by: ggbdpq <ggbdpq@gmail.com>
@nwparker
nwparker marked this pull request as ready for review October 9, 2026 11:43
@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a35a295e-41e2-498e-8e8d-f6c18c8533ba

📥 Commits

Reviewing files that changed from the base of the PR and between 049bf80 and 7ca7031.


📒 Files selected for processing (6)
  • src/renderer/src/components/automations/AutomationSchedulePicker.test.ts
  • src/renderer/src/components/automations/automation-schedule-label.ts
  • src/shared/automation-schedules.test.ts
  • src/shared/automation-schedules.ts
  • src/shared/orchestration-check-output.ts
  • src/shared/terminal-control-character-escape.ts


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nwparker
nwparker merged commit c857fcc into main Oct 10, 2026
77 of 79 checks passed
@nwparker
nwparker deleted the nwparker/obvious-schedule-labels-10-09 branch October 10, 2026 06:41
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.

[Bug]: Automations table shows "Invalid schedule" for a valid multi-day weekly RRULE

1 participant