Repository navigation
fix(tray): editing a cron job saves a timezone it did not have - #1662
Conversation
Editing a cron job only selected the timezone combo when the zone was already in the list. An empty zone, or a zone that was not listed, left the previous selection in place. Save then wrote that leftover zone into the job. Clear the combo when the job has no zone. Keep an unlisted zone until the user picks a listed one. CronScheduleTimezoneTests passed 5. ./build.ps1 exit 0. Shared 4262 passed, 33 skipped. Tray 3995 passed. Signed-off-by: Sebastien Tardif <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThe cron editor clears stale timezone selections and preserves an existing unlisted timezone until the user chooses another. Example: Edit a job with no timezone after editing a job using America/Chicago.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains This PR addresses a concrete bug still present on current main; the focused fix remains necessary, and no introduced correctness or security defect was found. Priority: P2 Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherCronPage reads gateway job schedules into a shared WinUI editor, builds schedule patches, and sends them through OpenClawGatewayClient using cron.update. flowchart LR
A[Gateway cron list] --> B[Cron job view model]
B --> C[WinUI editor]
C --> D[Timezone preservation policy]
D --> E[Schedule patch]
E --> F[Gateway cron update]
Technical reviewBest possible solution: Land the focused editor-state repair once the current changed paths have the required Windows proof. Do we have a high-confidence way to reproduce the issue? Current-main source shows that opening an absent or unlisted timezone leaves the previous selection intact and Save writes that selection; no runtime reproduction was attempted during this read-only review. Is this the best way to solve the issue? The fix addresses the shared editor state directly, preserves existing timezone values, and uses the existing gateway update path without adding settings or changing the schedule format. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9e4999c6d43f. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed October 15, 2026, 12:48 AM ET / 04:48 UTC (Revision 5). |
Signed-off-by: Sebastien Tardif <[email protected]>
|
Global triage: NEEDS_HUMAN_TEST. Take confidence 55%; recommendation confidence 97%; effort small; risk medium. Reviewed exact head Maintainer or proof-pool owner: run every declared Windows proof pool at this exact head and replace blocked or historical evidence with current-head results. This is a triage classification, not a merge action. No branch changes were made. |
Preserve both cron timezone editing and the running-state latch behavior added by openclaw#1666. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f66f0e00-0c9b-4632-8bc4-9dae1cd81754
Ensure every edit starts with an empty timezone combo before applying cron-specific state, and cover all preserved-state cleanup paths. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f66f0e00-0c9b-4632-8bc4-9dae1cd81754
Add explicit in-memory cron fixture responses and owned-window UI coverage for timezone preservation, replacement, and form lifecycle transitions. Expose stable cron title/action IDs and the localized Edit action name without changing editor behavior. Co-authored-by: Copilot App <[email protected]> Copilot-Session: f66f0e00-0c9b-4632-8bc4-9dae1cd81754
|
@clawsweeper re-review Current-head proof is now attached for 7738428. The retained CronEditor_ tests passed 2/2 with zero skips across four isolated app lifetimes. The PR body contains inspected editor screenshots and saved schedule receipts for listed, absent, unlisted, explicit UTC, job switching, Every/At transitions, cancel/reopen, and new-job reset. Every save changes the expression and verifies all other jobs remain unchanged; the repeated stateless helper check is not being used as lifecycle evidence. Full build, Shared (4312 passed, 36 skipped), Tray (4077 passed), and focused cron (15 passed) are clean locally. Required CI is still gated: two setup process-timing failures and a network-recovery timeout are being rerun on the exact same head. No merge until the required CI gate passes. |
|
🦞👀 Re-review progress:
|
What Problem This Solves
Fixes: editing a cron job can save a timezone the job did not have when the reused form retains another job's selection.
User Impact
User impact: absent timezones remain absent, unlisted timezones are retained until explicitly replaced or the schedule kind changes, and another job or new-job form does not inherit the previous timezone.
Why This Change Was Made
The editor clears the combo for every edit, preserves only an unlisted timezone, and clears preserved state on form lifecycle boundaries. Current main was merged without rewriting the contributor's history. The behavior and tests from #1666 (fix(tray): a cron job stays marked running after the gateway says it is not) remain intact.
A durable, opt-in cron fixture and two real-app UI tests replace the temporary proof harness. Stable automation IDs and the existing localized Edit name make targeting reliable without changing editor behavior. No second production cron state owner or new MCP command was added.
Evidence
Verified head:
7738428a04f21209eb2e81f39b90c79acf4471e4. Required CI Gate passed. Both fixture UI tests passed, zero skips, across four isolated app lifetimes in 26.6 seconds. The app's recorded product version contains this commit. Every save changes the expression and asserts all other fixture jobs are unchanged, preventing unchanged initial data or a save to the wrong job from passing.The actual app sent these schedules, which the in-memory fixture stored and returned through
cron.list:The lifecycle test independently repeats the new-job reset and unlisted-kind-switch case for both Every and At, then opens a different job directly from an unlisted edit. All save without
tz.The current-head editor below has no listed selection while retaining
Pacific/Aucklandin the saved schedule:Explicitly selecting UTC replaces that preserved value:
Change Type
Scope
winnodeRequired proof pools
windows-winui-interactive: cron edit/save and form lifecycle behavior. The coordinator-reserved current-head fixture pass completed successfully; owned-window screenshots and saved schedules are above. No broader pool inventory or production Gateway scheduling claim is made.Validation
With
OPENCLAW_REPO_ROOTset to this isolated worktree, on7738428a:.\build.ps1: passed, all five projects and documentation validation.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --logger 'console;verbosity=quiet': 4,312 passed, 36 skipped, 0 failed.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --logger 'console;verbosity=quiet': 4,077 passed, 0 failed.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --filter 'FullyQualifiedName~Cron' --logger 'console;verbosity=quiet': 15 passed, 0 failed, including timezone and running-latch regressions.dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-arm64 -p:Platform=ARM64 -p:DevBuild=false --no-restore --filter 'FullyQualifiedName~GatewayFixtureUiTests.CronEditor_' --logger 'console;verbosity=normal' --logger 'trx;LogFileName=cron-proof-7738428a.trx' --results-directory '<session-artifacts>\cron-proof-7738428a': 2 passed, 0 skipped, 0 failed. Opt-in fixture environment and the exact app executable were set as documented indocs/GATEWAY_FIXTURE_TESTING.md.Real Behavior Proof
7738428a04f21209eb2e81f39b90c79acf4471e4. Recorded app assembly SHA-256:20649CC4C60470C368A185F3012633B1A454E2EDD92AF19C5D7E0383DE8741EC.GatewayFixtureUiTests.CronEditor_tests above. Navigate to Cron; verify owned HWND/process/physical click target; expand the target card; edit and save through actual controls; verify accepted gateway requests, changed expressions, exact saved schedules, and unchanged other jobs. Combo lookup is scoped to its selection container, and transient UIA tree loss is bounded polling, not success.8b66c3926b454ea78aa4f6f9d3d95733,3327b5a3c47948bc8e847f29de0e300e,383ff6618d264bbf8d6a4ef3eeb1cd8d,82fb7aaf4e864adab651411e86637333. The tests, fixture, replay command and screenshots are retained; local TRX and JSON receipts also remain in session artifacts.Security Impact
Yes, explain the risk and mitigation: N/ACompatibility and Migration
Review Conversations
The stale proof request on
23120e60is answered by the current-head fixture evidence above. A fresh advisory ClawSweeper review was requested; no unresolved inline review threads remain.