Repository navigation
refactor(ui): present cron scratch reads with native readiness - #180116
Conversation
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d6b2ea9348
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| function loadScratch() { | ||
| if (!pending && isCurrent()) { | ||
| void setReadReceipt(request()); | ||
| } |
There was a problem hiding this comment.
Clear the failed read when a write succeeds
After a reload rejects, read remains errored until setReadReceipt receives another read. The preserved draft can then be saved or removed because the controls re-enable, but those write paths never replace or reset the receipt, so a successful write displays “saved” or “removed” alongside the stale reload failure. Clear the read error after a successful write, or keep writes blocked until the read is retried, so the action presents one coherent outcome.
AGENTS.md reference: AGENTS.md:L75-L75
Useful? React with 👍 / 👎.
|
Codex review: needs maintainer review before merge. What this changesThis PR presents automation scratch reads through Solid loading and error boundaries while preserving drafts and existing write handling. Example: Reload scratch while the textarea contains “Synthetic unsaved draft”.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored PR open: the focused refactor preserves existing ownership and fixes the prior stale-error finding, with no new actionable defect found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Automations editor sends scoped scratch get/set requests to the Gateway and presents redacted content, revision conflicts, and write outcomes. flowchart TD
A[Automations editor] --> B[Scratch request owner]
B --> C[Gateway scratch RPC]
C --> D[Revision and draft state]
B --> E[Read receipt]
E --> F[Solid readiness and error boundary]
D --> G[Scratch controls]
F --> G
Technical reviewBest possible solution: Retain the existing request owner and merge this focused readiness refactor through the repository’s inherited-failure handling. Do we have a high-confidence way to reproduce the issue? This is primarily a refactor; source inspection confirms the manual presentation on main, and the PR reports red/green reproduction of its intermediate stale-error defect. Is this the best way to solve the issue? The change follows the existing receipt-observer recipe, removes manual read-busy presentation, and preserves synchronous admission, scope retirement, revision checks, and mutation outcomes. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 414a00cd3c6a. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +39, Tests +67. Total +106 across 2 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label 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 (3 earlier review cycles)
Reviewed October 22, 2026, 12:47 AM ET / 04:47 UTC (Revision 4). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Merge current main while preserving native Scratch read readiness, main save-action retirement, and the existing nested-frame Count pointer repair. Validation: 17 focused Scratch tests, UI typecheck, scoped typed lint and formatting, and fresh independent review passed. Paired build comparison remains a pre-push gate.
|
Merged via squash auto-merge.
|
…law#180116) * refactor(ui): present cron scratch reads with native readiness * fix(ui): retire failed scratch reads when writes start * test(ui): wait for HTML preview pointer routing
What Problem This Solves
On-demand Cron scratch reads need native pending and error presentation while retaining the user's draft when a reload fails. The HTML publication test also needs trusted pointer routing through its nested sandbox frames before clicking Count.
User Impact
Loading, failed reloads, and retries preserve the Scratch editor and draft. Saving or removing after a failed reload clears that stale read error and shows the write outcome. The existing save/remove actions, revision conflicts, redaction safeguards, and connection/job/access retirement remain intact.
Why This Change Was Made
The existing synchronous request owner still admits and settles work. A promise-returning Solid memo observes each admitted read;
isPending,Loading, and a separateErroredslot present its readiness without replacing the editor. The conflict resolution against main68d5fb239c11ab34addfcbf127e46b95b6281b3cretains main's native save actions and renewable retirement lifetimes.The HTML test uses the existing
clickBoardWidgetControlhelper for one native Count click. All publication, source-retention, sandbox, exact-download, and output assertions are unchanged; main's failure diagnostics are retained.Evidence
pnpm deadcode:knipruns on exact head93a9b8c69bf5eeb3e312b7043d181111604c16e4and base68d5fb239c11ab34addfcbf127e46b95b6281b3cran on October 22, 2026, from 09:57:21 to 09:59:35 UTC. Both exited 1 with byte-identical reports of 13 existing heartbeat unused files, no UI or unused-dependency findings, and no new findings on the head. This is post-merge evidence, not a pre-merge pass.Scratch production LOC is 302 → 330 (+28) against the integrated main; tests are 277 → 343 (+66). The added production code presents read readiness and errors. No dependency, translation, route, tag, or selector changes.
Visual proof
All captures contain synthetic data; full frames were inspected. Loading and failure preserve the existing layout and unsaved draft.
CI and browser proof
Prior run 39727333709 failed HTML publication on head
5679b933ba72d3cb8e4780092143bd686a96dd60: Count remained 0 after its click. This was not established as inherited. The pointer repair addresses that interaction without weakening assertions. A shared diagnostic ended at its 300-second watchdog before browser launch and is inconclusive setup evidence. Full CI run 39756469571 succeeded on integrated head93a9b8c69bf5eeb3e312b7043d181111604c16e4, including UI and real-Gateway E2E. The PR merged as4da5842f1bd51510fe3e0b876d77eb788a632436. No new local E2E pass is claimed.