Skip to content

feat(settings): expose automation rules - #13223

Merged
teamleaderleo merged 24 commits into
mainfrom
lane-e-automation-rules-ui
Sep 22, 2026
Merged

teamleaderleo merged 24 commits into
mainfrom
lane-e-automation-rules-ui

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

Reviewer summary

Surfaces automation rules in Settings with their current status and controls, using the existing automation owner.

What changed

  • add a small Automation Rules card to Settings > Automation
  • show total/enabled/disabled rule counts from the existing AutomationConfigStore
  • expose Edit Rules for ~/.cmuxterm/automations.json through the existing preferred-editor service
  • expose Reload by routing directly to the existing AutomationEngine path
  • keep rule editing, testing, and logs on the existing JSON/cmux automation implementation

Tests

  • unit coverage for host-side rule counts and invalid-config status
  • Settings UI coverage for card discoverability and reload routing

Upstream base SHA: 4c67b4d8c59bc395ba2b75dc66bd688e5b846a6d

Tact Lane E: teamleaderleo/Tact#79


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Adds an Automation Rules card to Settings > Automation so rule counts and config status are visible without leaving Settings.

  • Edit Rules creates ~/.cmuxterm/automations.json when missing, then opens it in the preferred editor; creation failures show actionable guidance.
  • Reload routes to the running engine and reports success or engine-unavailable status.
  • Missing or malformed config shows product-safe messages without exposing raw errors.
  • Bundles translated settings strings with CmuxSettingsUI; adds host and UI coverage for counts, errors, actions, reload routing, and localization.

Written for commit f90c43f. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features

    • Added an Automation Rules card to Settings.
    • View rule counts, enabled and disabled rules, configuration status, missing files, and errors.
    • Edit automation rules in an external editor, creating the configuration when needed.
    • Reload automation rules directly from Settings and receive an action status.
    • Added localized Automation Rules interface text in 18 languages.
  • Tests

    • Added coverage for rule status reporting, configuration errors, editing, and reloading.

Replaces #13038 (same commits, head branch moved into the org so it gets the build cache and can be kept current with main).

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 33 minutes.

Check out review usage here.

View limit details

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

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 51d1c192-3f62-4432-9b9a-f8fd39c58ca6

📥 Commits

Reviewing files that changed from the base of the PR and between f915b77 and f90c43f.

📒 Files selected for processing (8)
  • Packages/macOS/CmuxSettingsUI/Package.swift
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Environment/SettingsHostActions.swift
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Resources/Localizable.xcstrings
  • Packages/macOS/CmuxSettingsUI/Sources/CmuxSettingsUI/Sections/AutomationSection.swift
  • Resources/Localizable.xcstrings
  • Sources/HostSettingsActions.swift
  • cmuxTests/HostSettingsShortcutNotificationTests.swift
  • cmuxUITests/SettingsAutomationBehaviorUITests.swift

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.

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@greptile-apps

greptile-apps Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; the previously reported creation-error handling, sanitization, and localization gaps are fully addressed.

Findings

  1. P2 Creation Failures Are Hidden ▶
  2. P2 Raw Filesystem Error Exposed ▶
  3. P2 Alert Translations Are Incomplete ▶

Summary

Adds an Automation Rules card to macOS Settings backed by the existing automation configuration store and engine.

  • Displays localized rule counts and missing, empty, malformed, loading, and reload states.
  • Opens or creates the JSON rules file through the preferred editor and reports creation failures with sanitized guidance.
  • Routes reload requests to the running automation engine.
  • Completes the creation-failure alert translations across all supported app locales.
  • Adds host-side and UI coverage for status reporting and actions.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    Settings[Settings: Automation Rules] --> Host[SettingsHostActions]
    Host --> Store[AutomationConfigStore]
    Store --> File[~/.cmuxterm/automations.json]
    Settings --> Edit[Edit Rules]
    Edit --> Host
    Host --> Editor[Preferred Editor]
    Settings --> Reload[Reload]
    Reload --> Host
    Host --> Engine[AutomationEngine]
Loading

Reviews (6) · Last reviewed commit: "fix(settings): translate automation aler..."

Comment thread Sources/HostSettingsActions.swift Outdated
@greptile-apps

This comment has been minimized.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Addressed the outside-diff compilation finding in 2a7f663: removed the duplicate dangling .task modifiers following refreshAutomationRulesStatus(); the existing view body retains the observation and policy tasks. Also declared defaultLocalization: "en" for the package resources added by this PR. Swift frontend parsing passes for AutomationSection, HostSettingsActions and its behavior tests. Full app/package/unit CI remains required; this is not yet a dogfood or merge-readiness claim.

Comment thread Sources/HostSettingsActions.swift
Comment thread Resources/Localizable.xcstrings
@teamleaderleo teamleaderleo added the full-ci EXPENSIVE: full macOS tests/builds; overrides selective PR routing. Not needed for normal checks. label Sep 20, 2026
@teamleaderleo
teamleaderleo enabled auto-merge (squash) September 20, 2026 18:14
teamleaderleo and others added 2 commits September 22, 2026 10:37
Kept both sides: automation-rules host actions next to main's custom-sidebar actions, the automation config parameters next to main's computersActions/runComputerUseOnboardingAction init parameters, and both package resources (the Settings UI string catalog and main's CustomSidebars copy). This branch's tests now pass the onboarding action main made required. Localizable.xcstrings: main's catalog plus this branch's two new keys.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@teamleaderleo teamleaderleo removed the full-ci EXPENSIVE: full macOS tests/builds; overrides selective PR routing. Not needed for normal checks. label Sep 22, 2026
@teamleaderleo
teamleaderleo merged commit 3c007a5 into main Sep 22, 2026
74 of 86 checks passed
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.

1 participant