Skip to content

feat(ui): manage automation condition triggers - #126534

Merged
clawsweeper merged 2 commits into
mainfrom
openclaw/cron-precheck-preflight-feature-considerations
Aug 20, 2026
Merged

clawsweeper merged 2 commits into
mainfrom
openclaw/cron-precheck-preflight-feature-considerations

Conversation

@clawsweeper

@clawsweeper clawsweeper commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Automation condition triggers already prevent unnecessary model calls, but Control UI did not show that an automation was conditional, could not manage the trigger, and could not filter conditional jobs. Operators had to switch to the CLI or agent tooling and could otherwise misread a conditional automation as running its agent task on every scheduled occurrence.

Issue creation was attempted through both GraphQL and REST, but the current GitHub token lacks issue-write permission (403), so this PR carries the complete durable context.

Why This Change Was Made

This reuses the existing trigger job contract: Control UI adds a compact indicator and Advanced editor, while an additive cron.list.trigger filter keeps Conditional/Unconditional filtering correct before pagination. Existing configured triggers remain preserved when cron.triggers.enabled is false and can still be cleared.

No scheduler execution path, trigger semantics, or default behavior changes.

User Impact

Operators can now identify conditional automations at a glance, filter the inventory by condition presence, and create, edit, or clear trigger scripts directly from Control UI. Jobs without triggers behave exactly as before.

Evidence

Control UI

Filter and compact condition indicator:

Automation list with Condition filter and trigger icon

Collapsed Advanced summary:

Advanced section showing configured trigger

Expanded trigger editor:

Condition trigger editor

Validation

  • node scripts/run-vitest.mjs packages/gateway-protocol/src/cron-validators.test.ts src/cron/service.list-page-sort-guards.test.ts src/gateway/server-methods/cron.validation.test.ts ui/src/lib/cron/index.test.ts ui/src/pages/cron/view.test.ts — 404 tests passed.
  • node scripts/run-vitest.mjs ui/src/pages/cron/cron-page.test.ts — 18 tests passed.
  • node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/cron-trigger-filter.e2e.test.ts — browser E2E passed.
  • pnpm protocol:check — generated schema/Swift/Kotlin consistency passed.
  • pnpm tsgo:core, pnpm tsgo:core:test, and pnpm tsgo:ui — passed.
  • pnpm lint:core and targeted UI stylelint — passed.
  • pnpm build — passed, including the production Control UI bundle.
  • Database-first, media helper, sidecar loader, import-cycle, webhook-body-order, pairing-auth, and native-state-schema guards passed.
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main — clean; no accepted/actionable findings.

The aggregate changed-files command passed every lane through UI typecheck but its core-lint child was terminated by the local command time budget (exit 143); the same required pnpm lint:core lane passed directly afterward. The Linux host's macOS tooling suite is locally blocked because the host lacks the file binary; protocol Swift generation/check passed and CI remains the platform proof.

CI gate repair

  • Exact-head CI run 32329711374 exposed a non-isolate-safe deep mock in models-list-result.cli-runtime-availability.test.ts: the test passed alone but could reuse the real credential module in a shared Vitest worker and report the fake Claude login unavailable.
  • The repair now writes a fake Claude credential file under an isolated temporary HOME, exercising the real Gateway availability boundary without a production test seam.
  • Focused proof and a same-worker preload run both pass; fresh branch autoreview is clean. The repository-native landing flow remains gated on the new exact-head CI run.
  • Squash attribution is carried by the branch commit trailer: Co-authored-by: Tak Hoffman <[email protected]>.

AI assistance

  • AI-assisted implementation
  • Reviewed and understood the code and behavior
  • Ran repository autoreview and addressed all actionable findings

@clawsweeper

clawsweeper Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime labels Aug 20, 2026
@clawsweeper
clawsweeper marked this pull request as ready for review August 20, 2026 03:51
@openclaw-barnacle openclaw-barnacle Bot added size: L maintainer Maintainer-authored PR labels Aug 20, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 20, 2026
@clawsweeper

clawsweeper Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 10:03 AM ET / 14:03 UTC.

ClawSweeper review

What this changes

The branch adds Control UI indicators, editing controls, and filtering for existing cron condition triggers, adds an optional paginated cron-list filter, and isolates an ambient Claude CLI credential test.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open: this maintainer-labeled feature has no source-backed correctness finding, but exact-head CI is still incomplete and requires maintainer merge handling.

Priority: P2
Reviewed head: b2e9dc039cc5edc6d8c943ab920050ec01db4369

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is coherent and well-covered for its scope, pending only exact-head CI and maintainer merge review.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless includes UI captures and targeted browser-harness evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless includes UI captures and targeted browser-harness evidence.
Evidence reviewed 5 items Existing trigger contract: Current main already documents condition triggers, their allowed schedules, state, and execution limits; this PR adds an operator UI over that established capability.
Server-side filter before pagination: The service resolves the new trigger filter and applies it before sorting, snapshotting, and paging, preserving the existing list-page invariant.
UI caller and protocol path: The UI sends the trigger filter only with table filters, while the Gateway handler forwards it to the service and the protocol schema validates its closed values.
Findings None None.
Security None None.

Live Verification

Command: pnpm openclaw cron --help

Result: PASS (completed)

pnpm openclaw cron --help
runner@runnervm76f27:/tmp/clawsweeper-live-proof-126534-jtyxD9/target$ pnpm openclaw cron --help
$ node scripts/run-node.mjs cron --help
pnpm openclaw cron --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 399.96 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 111.90 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.7s
node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

[tsdown-build] invocation 2/2 finished in 14.2s
[plugin-control-plane-loads] verified 35 built modules with native require and checked doctor closures
runtime-postbuild: 10 phases completed in 4790ms (slowest: built plugin control-plane loads 3680ms)
│
◇

OpenClaw 2026.8.1 (b2e9dc0) — All your chats, one OpenClaw.

Usage: openclaw cron|automations [options] [command]

Manage automations (via Gateway)

Options:
  --expect-final         Wait for final response (agent) (default: false)
  -h, --help             Display help for command
  --password ‹password›  Gateway password (if required)
  --port ‹port›          Local Gateway port
  --timeout ‹ms›         Timeout in ms (default: "30000")
  --token ‹token›      
… output truncated …

Assertions:

  • PASS expect_output: Manage automations (via Gateway)

How this fits together

Cron jobs are configured in Control UI and sent to the Gateway cron API, which reads and updates persistent automations. This change carries existing trigger configuration through the UI, protocol, and server-side pre-pagination filtering without changing scheduler execution.

flowchart LR
  A[Operator in Control UI] --> B[Cron editor and filters]
  B --> C[Gateway cron API]
  C --> D[Persistent cron service]
  D --> E[Filtered automation page]
  E --> B
Loading

Before merge

  • Resolve merge risk (P1) - Exact-head CI remains in progress; merge should wait for required checks and a refreshed clean merge result.
  • Complete next step (P2) - The protected maintainer label and incomplete exact-head CI require maintainer merge handling rather than an automated repair lane.
Agent review details

Security

None.

PR surface

Source +246, Tests +197, Other +4. Total +447 across 20 files.

View PR surface stats
Area Files Added Removed Net
Source 12 248 2 +246
Tests 7 245 48 +197
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 4 0 +4
Total 20 497 50 +447

Review metrics

Metric Value Why it matters
Production versus test delta production +241/-2; tests and test support +252/-48; generated protocol +4 Feature growth is concentrated in the existing UI, Gateway, and protocol paths, with comparable focused coverage.
Cron list API 1 optional filter added The additive trigger filter is validated and applied before pagination, so existing clients remain unaffected.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the additive UI and protocol extension after exact-head CI is green and the maintainer review confirms the current merge result.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the additive UI and protocol extension after exact-head CI is green and the maintainer review confirms the current merge result.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a feature addition rather than a reported failure; the branch supplies source and browser-harness coverage for the new flow.

Is this the best way to solve the issue?

Yes: it reuses the existing persisted trigger contract and puts filtering at the service boundary before pagination instead of creating a parallel scheduler path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against fae9bd6bafa1.

Labels

Label justifications:

  • P2: This is a bounded operator-facing automation-management enhancement without evidence of an urgent regression.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is exempt from the external-contributor proof gate; its body nevertheless includes UI captures and targeted browser-harness evidence.

Evidence

What I checked:

Likely related people:

  • roboclaw-bot: Local blame attributes the changed cron filtering and Control UI trigger-gate lines to the checked-out feature head. (role: current feature commit author; confidence: medium; commits: b2e9dc039cc5; files: src/cron/service/ops-read.ts, ui/src/pages/cron/cron-page.ts)
  • Takhoffman: The current head’s Claude CLI test-isolation repair carries this co-author attribution. (role: test-repair co-author; confidence: medium; commits: b2e9dc039cc5; files: src/gateway/server-methods/models-list-result.cli-runtime-availability.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Wait for the exact-head CI run to complete green before merge.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-20T03:56:56.869Z sha 9ee215e :: needs maintainer review before merge. :: none

@clawsweeper
clawsweeper force-pushed the openclaw/cron-precheck-preflight-feature-considerations branch from 1fe4712 to b2e9dc0 Compare August 20, 2026 13:54
@clawsweeper

Copy link
Copy Markdown
Contributor Author

Land-ready evidence for exact head b2e9dc039cc5edc6d8c943ab920050ec01db4369.

Completed:

  • Reused the existing condition-trigger owner; added server-side filtering before pagination plus Control UI visibility and Advanced management.
  • Replaced the unrelated flaky deep CLI-credential mock exposed by the first exact-head run with a real fake credential file under an isolated temporary HOME.
  • Preserved the requested squash attribution in the branch commit message: Co-authored-by: Tak Hoffman <[email protected]>.

Local proof:

  • node scripts/run-vitest.mjs packages/gateway-protocol/src/cron-validators.test.ts src/cron/service.list-page-sort-guards.test.ts src/gateway/server-methods/cron.validation.test.ts ui/src/lib/cron/index.test.ts ui/src/pages/cron/view.test.ts — 404 passed.
  • node scripts/run-vitest.mjs ui/src/pages/cron/cron-page.test.ts — 18 passed.
  • Targeted Control UI Playwright E2E — passed.
  • Protocol generation/check, core/UI typechecks, core lint, targeted UI stylelint, and build — passed.
  • node scripts/run-vitest.mjs src/gateway/server-methods/models-list-result.cli-runtime-availability.test.ts — 2 passed.
  • OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/gateway/server-methods/models-auth-status.test.ts src/gateway/server-methods/models-list-result.cli-runtime-availability.test.ts — passed with the real credential module preloaded in the same non-isolated worker.
  • Path-scoped check-changed — passed.
  • Fresh branch autoreview — clean, no accepted/actionable findings.

Hosted proof:

Known proof gaps: none.

@clawsweeper
clawsweeper merged commit 267ffc4 into main Aug 20, 2026
241 checks passed
@clawsweeper

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@clawsweeper
clawsweeper deleted the openclaw/cron-precheck-preflight-feature-considerations branch August 20, 2026 14:20
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 21, 2026
* feat(ui): manage cron condition triggers

* test(models): isolate ambient CLI availability

Co-authored-by: Tak Hoffman <[email protected]>

---------

Co-authored-by: RoboClaw <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants