Skip to content

fix(ui): follow active scheduler trigger capability - #126945

Merged
steipete merged 1 commit into
mainfrom
steipete/practical-blackwell-f1ffff
Aug 21, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/practical-blackwell-f1ffff

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Closes #126944

What Problem This Solves

Fixes an issue where operators editing automation trigger configuration in Control UI could see authoring availability derived from unsaved or saved-but-unapplied drafts instead of the running scheduler. The UI could claim condition triggers were disabled while active jobs still executed, or expose authoring that active runtime policy rejected.

Why This Change Was Made

The running CronService now projects its effective trigger capability as a required triggersEnabled fact in the existing cron.status result. Control UI consumes that scheduler-owned status directly and deletes the duplicate draft-config resolver; unknown status exposes neither authoring nor a false disabled claim. No config/hash inference, compatibility fallback, protocol-version bump, generated-client change, or SQLite change is involved.

The scheduler status fact remains independent of the global cron enable switch, matching existing execution and validation ownership. Existing configured triggers remain visible and clearable when trigger execution is disabled, and trigger filtering is unchanged.

User Impact

Automation trigger controls now match the Gateway process that will actually accept and execute them. Unsaved edits and saved-but-unapplied configuration no longer change runtime presentation, and reconnect refreshes capability from the replacement scheduler.

Before: an unsaved disable draft falsely claims active triggers are disabled.

Before: unsaved disable draft falsely controls runtime presentation

After: the same draft leaves authoring available because the running scheduler still permits triggers.

After: scheduler-owned status keeps trigger authoring available

Before: an unsaved enable draft exposes authoring while the active scheduler rejects triggers.

Before: unsaved enable draft exposes rejected trigger authoring

After: the same draft cannot override the scheduler-owned disabled capability.

After: scheduler-owned status keeps rejected trigger authoring hidden

Evidence

  • node scripts/run-vitest.mjs src/cron/service.stream-validation.test.ts src/gateway/server.cron.test.ts src/plugins/contracts/scheduled-turns.contract.test.ts ui/src/pages/cron/cron-page.test.ts ui/src/pages/cron/view.test.ts ui/src/pages/cron/view-run-history.test.ts ui/src/pages/agents/view.test.ts — 185 tests passed across four routed shards.
  • node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/cron-trigger-authoring.e2e.test.ts ui/src/e2e/cron-trigger-filter.e2e.test.ts — 3 real-Chromium tests passed.
  • git diff --name-only -z | xargs -0 node scripts/check-changed.mjs -- — passed all selected core, UI, plugin-contract, extension, scripts, lint, typecheck, database/schema, cycle, and security guards.
  • pnpm build — passed, including the production Control UI bundle.
  • pnpm protocol:check — passed; generated schema, Swift, and Kotlin outputs remained unchanged.
  • .claude/skills/autoreview/scripts/autoreview --mode uncommitted — clean; no accepted/actionable findings.
  • Before/after Chromium captures above were inspected after capture.

Production LOC: +7/-12 (net -5) | Tests: +259/-21 | Development fixture: +1/-0.

AI assistance

  • AI-assisted implementation
  • Reviewed and understood the code and behavior
  • Ran repository autoreview and addressed the transient unknown-status presentation gap found during lead review

Control UI automation trigger authoring now reflects the running scheduler across unsaved and saved-but-unapplied config edits and reconnects.
@clawsweeper

clawsweeper Bot commented Aug 21, 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 scripts Repository scripts labels Aug 21, 2026
@steipete
steipete marked this pull request as ready for review August 21, 2026 02:01
@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Aug 21, 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 21, 2026
@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 10:07 PM ET / August 21, 2026, 02:07 UTC.

ClawSweeper review

What this changes

The PR adds scheduler-owned trigger capability to cron status and makes Control UI use it instead of unapplied configuration drafts.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

No blocking correctness finding. Keep this protected maintainer PR open for normal exact-head CI and merge handling; the patch cleanly moves trigger capability ownership from editable UI drafts to the running scheduler.

Priority: P2
Reviewed head: 455807c80b942adbd551e98cf05ac6955eaa31b7

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-boundary repair with strong supplied UI evidence and no identified correctness defect.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored PR is outside the external-contributor proof gate; its body nevertheless supplies before/after Chromium captures and reports a matching real-Chromium E2E run.
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 outside the external-contributor proof gate; its body nevertheless supplies before/after Chromium captures and reports a matching real-Chromium E2E run.
Evidence reviewed 6 items Current-main defect location: Current main derives trigger availability from the editable runtime configuration, so unsaved and saved-but-unapplied drafts can override the running scheduler's presentation.
Owner-boundary repair: The PR projects the effective trigger policy from CronService status, which is forwarded directly by the cron Gateway handler and consumed by the UI status loader.
UI behavior and sibling state: The UI waits for a scheduler status before presenting capability, retains configured-trigger clearing when disabled, and regression tests cover both draft directions plus reconnect refresh.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/cron-trigger-authoring.e2e.test.ts

Result: FAIL (failed) — step 1 run node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/cron-trigger-authoring.e2e.test.ts: terminal command did not produce output within 20 seconds: "node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/cron-trigger-authoring.e2e.test.ts"

node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/cron-trigger-authoring.e2e.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-126945-DlB542/target$ node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoad
er runner ui/src/e2e/cron-trigger-authoring.e2e.test.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-126945-DlB542/target

node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/cron-trigger-authoring.e2e.test.ts












































Assertions:

  • FAIL expect_output: Test Files

How this fits together

CronService owns active scheduler configuration and exposes status through Gateway RPC. Control UI consumes that status when deciding whether to offer condition-trigger authoring.

flowchart LR
  A[Active scheduler config] --> B[Cron service]
  B --> C[Cron status]
  C --> D[Gateway RPC]
  D --> E[Control UI]
  E --> F[Trigger authoring controls]
Loading

Before merge

  • Complete next step (P2) - The patch has no concrete automated repair remaining; the protected maintainer label and incomplete exact-head checks require normal maintainer merge handling.
Agent review details

Security

None.

PR surface

Source -2, Tests +235, Other +1. Total +234 across 16 files.

View PR surface stats
Area Files Added Removed Net
Source 6 12 14 -2
Tests 9 254 19 +235
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 0 +1
Total 16 267 33 +234

Review metrics

Metric Value Why it matters
Production versus test delta production +7/-12 (net -5); tests +259/-21; fixture +1 The fix removes duplicate draft-config policy while adding focused service, Gateway, UI, and Chromium coverage.
Scheduler status contract 1 required capability field added The new field makes the scheduler's effective trigger policy available to the Control UI without draft-config inference.

Stored data model

Persistent data-model change detected: serialized state: src/cron/service/state.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #126944
Summary: This PR is the candidate repair for the linked Control UI draft-versus-active-scheduler defect.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best possible solution:

Make Control UI condition-trigger controls depend solely on the active scheduler capability returned by Gateway, then land the refreshed exact-head implementation.

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

Yes. Current main directly reads the editable configuration for trigger availability, and the supplied focused Chromium scenario exercises divergent draft and active scheduler values.

Is this the best way to solve the issue?

Yes. Publishing the policy from CronService removes the duplicate UI-side reconstruction; retaining the old draft resolver would leave two competing sources of truth.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This fixes a bounded automation-authoring mismatch that can misstate the active scheduler policy to operators.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored PR is outside the external-contributor proof gate; its body nevertheless supplies before/after Chromium captures and reports a matching real-Chromium E2E run.

Label justifications:

  • P2: This fixes a bounded automation-authoring mismatch that can misstate the active scheduler policy to operators.
  • 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 outside the external-contributor proof gate; its body nevertheless supplies before/after Chromium captures and reports a matching real-Chromium E2E run.

Evidence

What I checked:

  • Current-main defect location: Current main derives trigger availability from the editable runtime configuration, so unsaved and saved-but-unapplied drafts can override the running scheduler's presentation. (ui/src/pages/cron/cron-page.ts:51, ab2bbd42dfaf)
  • Owner-boundary repair: The PR projects the effective trigger policy from CronService status, which is forwarded directly by the cron Gateway handler and consumed by the UI status loader. (src/cron/service/ops-read.ts:45, 455807c80b94)
  • UI behavior and sibling state: The UI waits for a scheduler status before presenting capability, retains configured-trigger clearing when disabled, and regression tests cover both draft directions plus reconnect refresh. (ui/src/pages/cron/view.ts:1731, 455807c80b94)
  • Scheduler semantics: The added service test establishes that trigger capability follows cron.triggers.enabled independently of the global scheduler enable switch, matching existing trigger validation behavior. (src/cron/service.stream-validation.test.ts:42, 455807c80b94)
  • Feature provenance: The prior status implementation on current main dates to commit a4901b6; the new PR is the first history hit for this trigger-status projection. (src/cron/service/ops-read.ts:44, a4901b6291)
  • Review data availability: Local gitcrawl is unavailable and GitHub API access could not resolve; the supplied hydrated PR context was used for discussion, proof, labels, and check state.

Likely related people:

  • Josh Avant: Git blame attributes the current CronService status implementation to commit a4901b6. (role: status-surface author; confidence: high; commits: a4901b6291; files: src/cron/service/ops-read.ts)

Rank-up moves

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

  • Wait for the supplied in-progress exact-head checks to complete 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.

@steipete
steipete merged commit a4b3f63 into main Aug 21, 2026
315 checks passed
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete
steipete deleted the steipete/practical-blackwell-f1ffff branch August 21, 2026 04:28
steipete added a commit that referenced this pull request Aug 21, 2026
`main` is red: `check-lint-core-5` fails with

    ui/src/pages/cron/view.test.ts
      1124:4  error  File has too many lines (1004).  eslint(max-lines)

The file has been growing for a while (1104 lines at fa75cdd, 1116 at
2acfc47) and crossed the 1000 code-line cap at a4b3f63 (#126945). Every
PR opened since inherits the failure, so this is not any one PR's fault to fix
in passing -- it blocks the merge gate for everyone.

Repo policy forbids a `max-lines` suppression, so the file is split along the
seam it already had: three top-level describes, one of which was two thirds of
the file. `cron view editor` moves to `view.editor.test.ts`; `cron view list
pane` and `cron view selects` stay in `view.test.ts`. The four DOM helpers the
blocks shared move into the existing `view.test-support.ts` sibling rather than
being duplicated, and each file imports only what it uses.

No test content changed: 42 tests before, 42 after, same 41 `it(` declarations.
Sizes drop to 373 / 721 / 143 lines, all well under the cap.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 22, 2026
Control UI automation trigger authoring now reflects the running scheduler across unsaved and saved-but-unapplied config edits and reconnects.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 22, 2026
…aw#127018)

`main` is red: `check-lint-core-5` fails with

    ui/src/pages/cron/view.test.ts
      1124:4  error  File has too many lines (1004).  eslint(max-lines)

The file has been growing for a while (1104 lines at b7ec570, 1116 at
ed40a7d) and crossed the 1000 code-line cap at 4310d65 (openclaw#126945). Every
PR opened since inherits the failure, so this is not any one PR's fault to fix
in passing -- it blocks the merge gate for everyone.

Repo policy forbids a `max-lines` suppression, so the file is split along the
seam it already had: three top-level describes, one of which was two thirds of
the file. `cron view editor` moves to `view.editor.test.ts`; `cron view list
pane` and `cron view selects` stay in `view.test.ts`. The four DOM helpers the
blocks shared move into the existing `view.test-support.ts` sibling rather than
being duplicated, and each file imports only what it uses.

No test content changed: 42 tests before, 42 after, same 41 `it(` declarations.
Sizes drop to 373 / 721 / 143 lines, all well under the cap.
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. scripts Repository scripts size: M 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.

[Bug]: Control UI trigger capability follows unapplied config drafts

1 participant