Repository navigation
fix(ui): load heartbeat scratch into the read-only monitor field - #135508
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 2, 2026, 9:53 AM ET / 13:53 UTC. ClawSweeper reviewWhat this changesThe PR fetches a selected heartbeat automation’s private scratch for administrators and displays it in the Control UI’s read-only monitor without adding it to editable cron form data. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessThe PR remains necessary: current main still leaves heartbeat monitor content empty. The updated branch correctly uses the existing admin-only RPC, rechecks access and selection after the request, and addresses the prior proof requirements; no blocking patch defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI reads cron job metadata from the Gateway, but heartbeat instructions are kept in separately authorized private scratch. This change bridges that authorized read into ephemeral UI display state while preserving the normal cron save payload boundary. flowchart LR
A[Administrator selects heartbeat job] --> B[Control UI cron page]
B --> C{Administrator access}
C -->|yes| D[Gateway scratch read]
C -->|no| E[Empty read-only monitor]
D --> F[Ephemeral display state]
F --> G[Heartbeat monitor]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +53, Tests +162. Total +215 across 6 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the localized administrator-gated display read after normal exact-head CI gates complete; retain private scratch outside CronFormState and public cron responses. Do we have a high-confidence way to reproduce the issue? Yes. The supplied real-Gateway baseline and current-main source both show that heartbeat scratch exists but the selected Control UI monitor receives the empty public-payload fallback. Is this the best way to solve the issue? Yes. Reusing the existing admin-only Gateway method and storing its result only in selection-scoped display state fixes the missing projection without widening public job data or creating a second persistence path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 645c0ac609ab. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles) |
This comment was marked as spam.
This comment was marked as spam.
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Real Control UI proof on exact head
Sanitized green observation: {
"actualValue": "# Live heartbeat checklist\n\n- Inspect queued work.\n",
"mutablePayloadText": "",
"readOnly": "",
"sentMethods": ["cron.scratch.get", "cron.runs"],
"publicListContainsScratch": false,
"publicGetContainsScratch": false
}Focused validation: cron page 35 passed; mock browser 3 passed; real-Gateway browser 1 passed; Oxfmt, Oxlint, and |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Thanks @gaoanze888! Proof: A real Gateway with existing heartbeat scratch now shows the exact text in the Control UI's read-only monitor field. The mutable form stays empty, one admin-only scratch read is sent, and public cron list/get responses still contain no scratch. Screenshot and observation.
Landed: cf28405 Source head: 60ce14f |
…5508) Closes #135457 ## What Problem This Solves The Control UI showed an empty **Heartbeat monitor** field for every heartbeat automation, even when the Gateway already held private per-job scratch. The command-line interface showed the stored scratch correctly. `jobToForm` projects text from public cron payloads. A heartbeat payload has no text because its monitor instructions live in private scratch. The page never called the existing `cron.scratch.get` method, so the read-only field always received the empty fallback. ## Fix - Fetch scratch once when an administrator selects a heartbeat automation. - Keep the result in ephemeral page display state, outside `CronFormState` and all add or update payloads. - Revalidate the Gateway connection, selected job, request generation, heartbeat payload kind, and current administrator access after the request resolves. - Clear display state when the connection, access, selection, or panel changes. - Show scratch-read failures instead of presenting a false empty success state. - Keep `cron.scratch.get` at `operator.admin` and keep scratch out of `cron.list`, `cron.get`, and `CronJob`. Command, script, and skill-review automation payloads still use their existing read-only projection. ## Evidence Baseline main: `2837afb07dc9faa27f631760b5f4de9dbb8de940` Sanitized real-Gateway screenshot and observation: openclaw/openclaw#135508 (comment) - Red, real Gateway: existing heartbeat scratch was returned by the Gateway, but the Control UI field stayed empty and sent no `cron.scratch.get` request. - Green, real Gateway: the field displayed the exact stored scratch and remained read-only. - The green observation recorded one `cron.scratch.get`, an empty mutable `payloadText`, and no scratch in `cron.list` or `cron.get`. - Mock browser end-to-end tests cover the visible authorized result, the read-only operator path, and a visible read failure: 3 passed. - The cron page unit suite covers an in-flight administrator-to-read-only downgrade: 35 passed. - Real-Gateway browser end-to-end proof: 1 passed. - Oxfmt, Oxlint, and `git diff --check` passed. Production: `+56/-3`. Tests and test support: `+172/-10`. ## Regression provenance PR #112967 introduced private heartbeat scratch without changing the existing UI projection. PR #130030 later made the empty projection explicit with the **Heartbeat monitor** label. ## AI assistance AI-assisted repair and validation. A maintainer independently inspected the storage owner, Gateway authorization, protocol schemas, UI projection and save boundaries, sibling payload kinds, tests, docs, history, and real browser behavior. Co-authored-by: gaoanze <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
…nclaw#135508) Closes openclaw#135457 ## What Problem This Solves The Control UI showed an empty **Heartbeat monitor** field for every heartbeat automation, even when the Gateway already held private per-job scratch. The command-line interface showed the stored scratch correctly. `jobToForm` projects text from public cron payloads. A heartbeat payload has no text because its monitor instructions live in private scratch. The page never called the existing `cron.scratch.get` method, so the read-only field always received the empty fallback. ## Fix - Fetch scratch once when an administrator selects a heartbeat automation. - Keep the result in ephemeral page display state, outside `CronFormState` and all add or update payloads. - Revalidate the Gateway connection, selected job, request generation, heartbeat payload kind, and current administrator access after the request resolves. - Clear display state when the connection, access, selection, or panel changes. - Show scratch-read failures instead of presenting a false empty success state. - Keep `cron.scratch.get` at `operator.admin` and keep scratch out of `cron.list`, `cron.get`, and `CronJob`. Command, script, and skill-review automation payloads still use their existing read-only projection. ## Evidence Baseline main: `1e7394c79ab1f55e912791169dee1bd31052159d` Sanitized real-Gateway screenshot and observation: openclaw#135508 (comment) - Red, real Gateway: existing heartbeat scratch was returned by the Gateway, but the Control UI field stayed empty and sent no `cron.scratch.get` request. - Green, real Gateway: the field displayed the exact stored scratch and remained read-only. - The green observation recorded one `cron.scratch.get`, an empty mutable `payloadText`, and no scratch in `cron.list` or `cron.get`. - Mock browser end-to-end tests cover the visible authorized result, the read-only operator path, and a visible read failure: 3 passed. - The cron page unit suite covers an in-flight administrator-to-read-only downgrade: 35 passed. - Real-Gateway browser end-to-end proof: 1 passed. - Oxfmt, Oxlint, and `git diff --check` passed. Production: `+56/-3`. Tests and test support: `+172/-10`. ## Regression provenance PR openclaw#112967 introduced private heartbeat scratch without changing the existing UI projection. PR openclaw#130030 later made the empty projection explicit with the **Heartbeat monitor** label. ## AI assistance AI-assisted repair and validation. A maintainer independently inspected the storage owner, Gateway authorization, protocol schemas, UI projection and save boundaries, sibling payload kinds, tests, docs, history, and real browser behavior. Co-authored-by: gaoanze <[email protected]> Co-authored-by: Ayaan Zaidi <[email protected]>
|
🦞👀 Command router queued. I will update this comment with the next step. |

Closes #135457
What Problem This Solves
The Control UI showed an empty Heartbeat monitor field for every heartbeat automation, even when the Gateway already held private per-job scratch. The command-line interface showed the stored scratch correctly.
jobToFormprojects text from public cron payloads. A heartbeat payload has no text because its monitor instructions live in private scratch. The page never called the existingcron.scratch.getmethod, so the read-only field always received the empty fallback.Fix
CronFormStateand all add or update payloads.cron.scratch.getatoperator.adminand keep scratch out ofcron.list,cron.get, andCronJob.Command, script, and skill-review automation payloads still use their existing read-only projection.
Evidence
Baseline main:
2837afb07dc9faa27f631760b5f4de9dbb8de940Sanitized real-Gateway screenshot and observation: #135508 (comment)
cron.scratch.getrequest.cron.scratch.get, an empty mutablepayloadText, and no scratch incron.listorcron.get.git diff --checkpassed.Production:
+56/-3. Tests and test support:+172/-10.Regression provenance
PR #112967 introduced private heartbeat scratch without changing the existing UI projection. PR #130030 later made the empty projection explicit with the Heartbeat monitor label.
AI assistance
AI-assisted repair and validation. A maintainer independently inspected the storage owner, Gateway authorization, protocol schemas, UI projection and save boundaries, sibling payload kinds, tests, docs, history, and real browser behavior.