Skip to content

Improve Cron run history UX - #814

Merged
shanselman merged 4 commits into
openclaw:mainfrom
RBrid:user/rbrid/CronPageFixes
Jun 25, 2026
Merged

shanselman merged 4 commits into
openclaw:mainfrom
RBrid:user/rbrid/CronPageFixes

Conversation

@RBrid

@RBrid RBrid commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

Why this matters

Cron jobs can produce rich, multi-paragraph LLM answers, but the Windows Cron History view was only useful as a short status summary. That made one-time runs feel lossy: users could see that a job succeeded, but not easily inspect the actual answer, navigate to the run chat, or confidently re-run the same task without the UI shifting underneath them.

This PR makes Cron History behave more like a real run transcript surface instead of a compact log row.

What improved

  • Full run responses are now available in-place. History rows keep a compact preview, but expose a Full response expander that renders the complete sanitized response, including Markdown structure such as headings, lists, and emphasis.
  • Run history stays stable while refreshing. Expanded job cards and expanded full responses preserve their state while the page polls for a running job to finish, avoiding surprise collapses or focus jumps.
  • Run controls reflect the actual job state. Run Now, Edit, Remove, and the enabled toggle are disabled while a run is active; History stays available so users can inspect prior/current results.
  • Manual run feedback is more reliable. The tray now uses a response-aware cron.run path so it can distinguish “enqueued” from “declined” and show a visible warning instead of looking like the button did nothing.
  • Gateway compatibility is preserved. The detailed run path uses the gateway-compatible jobId request shape with fallback for older schemas.
  • Run chat navigation is consistent. Cron History now uses the same Open chat wording as the Sessions page when a run has a session key.
  • New display logic is covered by tests. Full-response extraction, transcript fallback, sanitization, completed one-time job behavior, running-state affordances, and payload shape are covered by shared/tray tests.
  • All new user-facing strings are localized across the existing resource locales.

User-visible result

After this change, a user can run a one-time Cron task, watch the row enter a clear running state, keep focus where they put it, and then expand the run history to read the complete LLM answer without leaving the Cron page. If the run has a backing chat session, they can jump to it with Open chat.

Validation

  • ./build.ps1
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore
  • git diff --check
  • Autoreview clean with Copilot engine
  • Hanselman dual-model review completed; accepted findings fixed

Screenshots

UI while re-running a Cron task:
image

Showing the full LLM response in the UI:
image

@clawsweeper

clawsweeper Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed June 25, 2026, 5:25 PM ET / 21:25 UTC.

Summary
The PR expands Windows Cron History with full-response rendering, stable running and expanded state, response-aware cron.run handling, localization updates, and shared/tray tests.

Reproducibility: not applicable. as a feature/UX PR; this is not a broken-current-main bug report. Current-main source inspection confirms the old compact history/send-only behavior, and the PR screenshots demonstrate the proposed UI behavior.

Review metrics: 2 noteworthy metrics.

  • Diff surface: 17 files, +1590/-107. The PR spans shared gateway protocol code, WinUI Cron rendering, localization resources, and tests, so maintainer compatibility review matters.
  • Gateway API surface: 1 default interface method added. Adding RunCronJobDetailedAsync changes the operator-client contract while attempting to preserve source compatibility for existing implementers.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Have a maintainer accept the current compatibility evidence or run a mixed-version cron.run smoke before merge.

Risk before merge

  • [P1] Mixed-version gateway compatibility remains the merge risk: the PR changes manual Cron runs from a send-only request to response-aware RPC and prefers jobId before falling back to legacy id/force.

Maintainer options:

  1. Smoke Mixed Gateway Compatibility (recommended)
    Run Run Now against the current gateway and one supported older gateway path to confirm response-aware acknowledgements and legacy fallback do not strand upgraded Windows clients.
  2. Accept Current Coverage
    Maintainers can rely on the PR's default interface implementation, legacy acknowledgement parsing, and new id/force fallback test while owning any older-gateway runtime uncertainty.
  3. Pause For Protocol Confirmation
    If Windows must support gateways that may not answer cron.run, pause until the permanent request/response compatibility rule is confirmed.

Next step before merge

  • [P2] Maintainer review should decide whether the response-aware cron.run compatibility evidence is sufficient; no narrow automated repair is identified.

Security
Cleared: No concrete security or supply-chain regression was found; the diff adds no dependencies or workflows and routes displayed run text through token/path and Markdown sanitization.

Review details

Best possible solution:

Land after maintainers accept or smoke-test response-aware cron.run compatibility against the supported gateway matrix, keeping the fallback and sanitization coverage.

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

Not applicable as a feature/UX PR; this is not a broken-current-main bug report. Current-main source inspection confirms the old compact history/send-only behavior, and the PR screenshots demonstrate the proposed UI behavior.

Is this the best way to solve the issue?

Yes, subject to compatibility acceptance. The PR is a maintainable path because it keeps interface source compatibility, sanitizes displayed run text, adds focused tests, and now covers the legacy id/force fallback path.

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: This is a normal user-facing Cron UX improvement with limited blast radius, but it touches shared gateway request semantics.
  • merge-risk: 🚨 compatibility: Merging changes cron.run request/response behavior and the shared operator-client interface, which can affect mixed Windows/gateway upgrades or custom client implementations.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR body screenshots were inspected and directly show the after-change running-state controls and full-response Cron History UI in the Windows app.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body screenshots were inspected and directly show the after-change running-state controls and full-response Cron History UI in the Windows app.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body screenshots were inspected and directly show the after-change running-state controls and full-response Cron History UI in the Windows app.
Evidence reviewed

What I checked:

  • Repository policy read: Read the full target AGENTS.md; its gateway/tray guidance and validation expectations shaped the compatibility review, while the ClawSweeper read-only contract meant no local build or test commands were run. (AGENTS.md:1, c939e3907546)
  • Architecture context: Connection architecture says the tray consumes gateway clients through the connection manager and tray actions should visibly surface pairing/configuration issues, which is relevant to this Cron gateway-client UX change. (docs/CONNECTION_ARCHITECTURE.md:1, c939e3907546)
  • Current main cron.run baseline: Current main still sends cron.run through the old TrySendTrackedRequestAsync path with { id, force }, so the response-aware request/result behavior is not already on main. (src/OpenClaw.Shared/OpenClawGatewayClient.cs:763, c939e3907546)
  • Current main history baseline: Current main truncates Cron run history display text to 120 characters and lacks the full-response expander/chat-navigation surface added by the PR. (src/OpenClaw.Tray.WinUI/Pages/CronPage.xaml.cs:1585, c939e3907546)
  • PR cron.run implementation: The PR head adds RunCronJobDetailedAsync, prefers jobId, falls back to legacy { id, force } on schema errors, and parses accepted/enqueued/runId/decline responses. (src/OpenClaw.Shared/OpenClawGatewayClient.cs:769, b6d51eb5878f)
  • PR interface compatibility: The new detailed Cron run method has a default implementation that delegates to the existing RunCronJobAsync, preserving source compatibility for interface implementers. (src/OpenClaw.Shared/IOperatorGatewayClient.cs:77, b6d51eb5878f)

Likely related people:

  • christineyan4: Authored the Cron Jobs redesign and follow-up review fixes that introduced the current card UI, run history surface, and Cron gateway affordances extended by this PR. (role: feature owner; confidence: high; commits: 61fcd3902764, 2f9ff0c05170; files: src/OpenClaw.Tray.WinUI/Pages/CronPage.xaml.cs, src/OpenClaw.Shared/OpenClawGatewayClient.cs, src/OpenClaw.Shared/IOperatorGatewayClient.cs)
  • bkudiess: Recent gateway protocol client foundation work and blame on the current Cron gateway methods make this a likely routing owner for operator-client compatibility questions. (role: recent gateway API contributor; confidence: medium; commits: b90ded9a5eea, 2cae69ba6ca4; files: src/OpenClaw.Shared/OpenClawGatewayClient.cs, src/OpenClaw.Shared/IOperatorGatewayClient.cs)
  • ranjeshj: Connection architecture refactors shaped the operator-client ownership boundary and AppState observation model that this PR continues to use. (role: adjacent connection owner; confidence: medium; commits: 5c49c5a820df, ece8758e9d1e; files: src/OpenClaw.Tray.WinUI/Pages/CronPage.xaml.cs, src/OpenClaw.Shared/IOperatorGatewayClient.cs)
  • RBrid: Has prior merged current-main history in the companion app, tray, and shared gateway areas beyond being the current PR author. (role: recent adjacent contributor; confidence: medium; commits: f2fa038bd080, 3fdfbfad837f; files: src/OpenClaw.Tray.WinUI/Pages/CronPage.xaml.cs, src/OpenClaw.Shared/OpenClawGatewayClient.cs)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Jun 25, 2026
@RBrid

RBrid commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 25, 2026
@RBrid

RBrid commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 25, 2026 •

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot removed proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jun 25, 2026
@RBrid

RBrid commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. 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. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jun 25, 2026
@RBrid
RBrid marked this pull request as ready for review June 25, 2026 20:48
RBrid and others added 3 commits June 25, 2026 14:00
Show full run responses in expandable history entries, preserve expanded state during refresh, and keep run controls stable while jobs execute.

Add response-aware cron.run handling so declined runs surface a warning and gateway-compatible payloads continue to work.

Co-authored-by: Copilot <[email protected]>
Add the new Cron run API to the merged pairing test fake and isolate WebSocket reconnect timing tests from full-suite parallel interference.

Co-authored-by: Copilot <[email protected]>
Treat accepted legacy cron.run acknowledgements as started and keep RunCronJobDetailedAsync source-compatible for existing operator client implementations.

Co-authored-by: Copilot <[email protected]>
Add loopback coverage proving response-aware cron.run retries the legacy id/force payload when a gateway rejects the new jobId shape.

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

Labels

merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. P2 Normal priority bug or improvement with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants