Repository navigation
fix(ui): preserve proof recordings during screenshots - #138459
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. |
|
The shared capture-gate failure from CI run 33903611044 is repaired. Both failing test shards hit the same stale screenshot-only fixture and eager default locator. Disabled capture now remains inert; the nonrecording fixture models Playwright's The original failure reproduces locally. The repair passes 13 unit/retention cases, 26 Chromium caller scenarios, the scoped changed checks, and isolated Codex review. Eight finalized recordings contain 641 decoded frames with zero padding flags. No assertions, timeouts, recording gates, or production Logs behavior were weakened or changed. The independent startup-size failure is tracked by existing PR #138461. The budget remains unchanged. CI on the updated head and native preparation still need to pass before landing. |
|
LAND-READY — exact head
The latest ClawSweeper review, published at 21:54 UTC for this exact head, reports no introduced correctness or security findings. Its remaining CI action and the earlier current-main refresh/recording/Logs rank-up moves are resolved. The complete 119-file inventory is Control UI code/tests/support: runtime +14/−19 (net−5), tests/support +2551/−1171. There are no configuration/default, schema, persistent-data migration, API or dependency changes. The generic config/data prompts marked Final-source local proof passes 49 owner/gate and 15 browser cases, including all six unchanged upstream Settings cases. All 174 decoded recording samples are intact; 40 stills and seven complete sampled video timelines were inspected. Exact commands/results: node scripts/run-vitest.mjs ui/src/pages/logs/logs-page.test.ts ui/src/pages/logs/view.test.ts ui/src/pages/logs/data.test.ts ui/src/lit/gateway-page-controller.test.ts ui/src/lit/poll-controller.test.ts ui/src/test-helpers/control-ui-e2e.test.ts ui/src/test-helpers/control-ui-e2e-artifacts.node.test.ts
# 49 passed /7 files
OPENCLAW_CAPTURE_UI_PROOF=1 OPENCLAW_UI_E2E_RECORD=1 OPENCLAW_UI_E2E_ARTIFACT_DIR=/tmp/objective-galileo-pr138459-rebased node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-flow.image-handoff.e2e.test.ts ui/src/e2e/initial-connect-splash.e2e.test.ts ui/src/e2e/settings-layout.e2e.test.ts ui/src/e2e/logs-autofollow.e2e.test.ts ui/src/e2e/logs-layout.e2e.test.ts -t 'submitted image|recovery pixels|finalized recording pixels|font pixels|fractional bounds|Control UI settings layout mocked Gateway E2E|returns to the newest line|keeps wrapped filters'
# 15 passed /5 files; all six upstream Settings cases;174 decoded samples intact
node scripts/check-changed.mjs --base 05a236c7afbcf1956e40642d4f1777af4a378da3 -- ui/src/e2e/initial-connect-splash.e2e.test.ts ui/src/test-helpers/control-ui-e2e-screenshot.ts ui/src/e2e/settings-layout.e2e.test.ts
# exit0; core-test/UI types, local oxfmt, repository guards, type-aware lint/style; no skip flags or root declaration build
git diff --check
# passSynthetic before/after proof remains available: recording before, recording after, Logs before, Logs after. Historical counts overlap. Earlier real-Gateway proof is retained for unchanged owners, not claimed as a fresh run; raw host/profile footage remains local. Native Chromium startup/resize padding is a separate observed limitation, with no frames filtered. The independent Settings wrapper lost an auxiliary tarball; its primary log/CDP trace remains intact as a separate follow-up. Startup #138490 and canonical Settings #138482 remain landed; Settings is byte-identical to pinned main, and the redundant 05dc alternative is removed. Original credit and SHA-distinguished evidence are preserved below and in the PR body. The native merge wrapper will now perform its final exact-head/rules checks; no bypass, admin merge or policy override is requested. The actual Settings conflict is resolved in rebased head The Settings alternative published in Fresh final-source proof passes 49 owner/gate tests and 15 browser cases, including all six upstream Settings cases, original image handoff, capture pixel/ancestor/font/DPR/recording checks and Logs auto-follow/layout. All 174 decoded owner samples are intact; 40 stills and seven complete sampled video timelines were inspected. The normal scoped changed gate passed with the two geometry files plus the preserved Settings conflict surface: core-test/UI types, local oxfmt, type-aware lint/style and repository guards; git diff --check passed. Fresh full 119-file isolated review against the pinned base is scoped-clean at P0, findings[]. Native current-main baseline dbc554b was refreshed and inspected. The relevant Settings, Logs and screenshot-owner source matches the pinned rebase baseline; Settings retains the upstream repair, while main still has the old Logs snapshot initializer and surface-only capture readiness. Required exact-head CI: CI run33922243194 is attached via pull_request to the full head SHA; observed queued, final result pending. Preparation and merge have not run; the parent owns CI watch and the exact-head checkpoint. Startup prerequisite #138490 remains landed, with credit to @obviyus and superseded #138461/#138472. Published Historical checkpoint for d3f29db (superseded status, proof retained)Landing is blocked on the shared startup-size repair. Exact-head CI for The capture-gate regression is resolved in hosted CI: UI shard 3/3 and Node compact-large-5 both passed on this exact head. Local owner/caller proof, finalized-recording pixel proof, scoped checks, and isolated review are recorded above. Native review artifacts validate for this head. Native preparation and merge have not run. Resume after the existing performance repair lands and this PR receives green CI covering it; preserve the budget and current proof gates. |
|
Codex review: blocked before merge. Reviewed September 4, 2026, 5:54 PM ET / 21:54 UTC. ClawSweeper reviewWhat this changesThe branch captures Control UI screenshots from an unchanged viewport and crops the completed PNG off-browser, while moving Logs automatic initial loads into the shared Gateway lifecycle controller. Merge readiness⛔ Blocked before merge - 4 items remain The branch has coherent owner-bound fixes for recording-safe Control UI proof capture and Logs initial loading; no introduced correctness or security defect was found. It is not land-ready until the remaining exact-head checks complete successfully. Priority: P2 Review scores
Verification
How this fits togetherControl UI end-to-end scenarios create screenshot and recording proof, while the Logs page turns Gateway lifecycle snapshots into initial loads, polling, and scrolling. This change preserves both proof artifacts and lifecycle-correct Logs updates. flowchart LR
A[Control UI scenario] --> B[Browser recording]
B --> C[Proof capture helper]
C --> D[PNG and video artifacts]
E[Gateway lifecycle snapshot] --> F[Logs page controller]
F --> G[Initial load and polling]
G --> H[Logs display]
Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the recording-safe capture and lifecycle-owner changes, then land after the exact-head required checks succeed. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: the changed screenshot and Logs lifecycle paths have focused regression coverage, although this read-only review did not execute the browser scenarios. Is this the best way to solve the issue? Yes: viewport capture followed by off-browser cropping preserves recordings, and the shared lifecycle controller is the correct owner for automatic Logs initialization. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 11a46fa85b47. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
d3f29db to
14845ee
Compare
Capture recording-safe viewport pixels and crop element PNGs outside the browser while preserving capture gates, readiness, and functional assertions. Move initial Logs reads to the connection lifecycle and fence delayed scroll completion to the request epoch. Retain negative controls, finalized recording-pixel proof, 289 capture scenarios, and focused Logs owner/browser evidence in the PR.
Resolve viewport locators only in the enabled recording branch and model Page.video() in the existing non-recording capture fixture. Retain the disabled-gate and owner-directory assertions, including no Page access before capture is enabled. The failing CI test reproduces locally before this change. Afterward, 13 unit/retention cases and 26 browser caller scenarios pass; all 641 frames in eight finalized recordings decode without padding flags.
Wait for finite ancestor and shadow-host motion before proof capture while retaining strict geometry, image-byte continuity and recording pixels. Extend the existing browser fixtures to prove readiness without stopping perpetual descendant animation. The duplicate Settings CI repair was absorbed from main via #138482; retain its cold-document coverage and failure diagnostics unchanged.
05dc7d7 to
8d74a25
Compare
|
Merged via squash.
|
* fix(ui): preserve proof recordings during screenshots Capture recording-safe viewport pixels and crop element PNGs outside the browser while preserving capture gates, readiness, and functional assertions. Move initial Logs reads to the connection lifecycle and fence delayed scroll completion to the request epoch. Retain negative controls, finalized recording-pixel proof, 289 capture scenarios, and focused Logs owner/browser evidence in the PR. * test(ui): keep disabled proof capture inert Resolve viewport locators only in the enabled recording branch and model Page.video() in the existing non-recording capture fixture. Retain the disabled-gate and owner-directory assertions, including no Page access before capture is enabled. The failing CI test reproduces locally before this change. Afterward, 13 unit/retention cases and 26 browser caller scenarios pass; all 641 frames in eight finalized recordings decode without padding flags. * test(ui): wait for proof presentation ancestors Wait for finite ancestor and shadow-host motion before proof capture while retaining strict geometry, image-byte continuity and recording pixels. Extend the existing browser fixtures to prove readiness without stopping perpetual descendant animation. The duplicate Settings CI repair was absorbed from main via openclaw#138482; retain its cold-document coverage and failure diagnostics unchanged.
What Problem This Solves
Resolves a problem where Control UI proof recordings could turn into a small row or a resized page padded with gray whenever a still screenshot was captured during recording. The WebM retained its expected dimensions, so dimension-only checks missed the damaged content.
The investigation also exposed an initial Logs load being repeatedly cancelled by ordinary Gateway metadata snapshots. That prevented the unchanged auto-follow proof from reaching its first screenshot.
Why This Change Was Made
Recorded proof now uses the existing unclipped viewport capture owner. Element-only PNGs are cropped afterward in Node with the already-installed image library; tall forms retain their meaningful viewport. The migration follows the recording/capture gates across the complete Control UI proof neighborhood rather than repairing only the reported callers. Fonts, meaningful content, finite presentation-owner motion, real interactions, and functional assertions remain part of readiness. Nonrecording native captures and ordinary safe viewport captures retain their existing paths.
The Logs repair moves automatic loading into the existing connection/identity lifecycle hook and deletes its row-emptiness initializer. Ordinary snapshots no longer supersede a pending tail or reload a successfully empty log. Completion-triggered scrolling is fenced to the request's connection epoch, so a retired request cannot force-scroll the replacement connection; reconnects, explicit refresh, incremental polling, and stale-response rejection retain their owners. No new flags, configuration, schema, dependencies, Playwright monkey-patches, or frame filtering are introduced. Gateway command-authority and timeout fixtures are outside this change.
User Impact
Developers and reviewers can retain element screenshots without damaging the accompanying recording. The Logs page also stops needlessly restarting its initial request on metadata updates. No setup or migration is required.
This does not claim to fix Chromium's native startup or viewport-resize padding: a no-screenshot control reproduced that separate behavior. Those frames remain intact and are explicitly distinguished from screenshot-induced corruption. Raw real-Gateway footage stays local because it can contain host/profile labels; the attached evidence is synthetic-only and was visually inspected.
Evidence
After rebasing onto
9f1c8a1c58bd1e889df4f7e78742ade56d7efefe, 189 browser cases across 27 files and 36 Logs owner/sibling cases passed with the original capture/recording gates enabled. This selection covers every caller file overlapping main, the screenshot pixel/font/readiness owner, Logs, and the original pin/sidebar/tool-turn captures. Four rebase conflicts preserve current-main Canvas, Workboard, and panel assertions. These are overlapping reruns, not additional distinct cases to add to the earlier 289. The unchanged earlier real-Gateway cron/lifecycle proof is retained rather than presented as a fresh run. A fresh isolated Codex review of the full rebased candidate was scoped-clean at P0.All 430 frames of five selected post-rebase recordings were decoded. Logs, dashboard pinning, background tasks, and the synthetic owner had no padding flags. Nine Workboard modal frames triggered the gray-edge heuristic; visual inspection confirmed the intact rendered modal/backdrop. The raw nonzero detector result is retained, with no frames removed.
Production LOC remains +14 / −19 (net −5). The final rebased candidate has 119 files, with tests/support +2,551 / −1,171 (net +1,380). The earlier 119-file published migration had tests/support +2,479/−1,157; the interim
05dc7d725ecc108a4a371f8c66444e45f9c380b2candidate had 120 files and tests/support +2,626/−1,234. Those historical scopes are preserved rather than added together. The only product runtime change remains the smaller Logs lifecycle owner.The first post-rebase changed gate stopped at core-test types because the private checkout still had
@openclaw/fs-safe0.7.0 installed while the pinned lockfile requires 0.7.2.pnpm install --frozen-lockfilerestored the declared version with no tracked dependency changes, and the full core-test typecheck retry passed. UI types, coercion/dead-export guards, and the complete 118-file lint/style scope then passed; this was local installation drift, not a source repair.CI follow-up: run 33903611044 found one shared capture-gate unit regression in both the UI and Node shards. The helper now resolves default locators only inside enabled recording capture, and the existing nonrecording fixture explicitly models
Page.video() === null. Disabled capture still accesses neither the page nor the artifact owner. The failure reproduces locally before repair; afterward 13 unit/retention cases and 26 real-browser caller scenarios pass. All 641 frames in eight new recordings decode with zero padding flags. Scoped changed checks and fresh isolated Codex review cover this two-file test-support follow-up; the Logs production repair is unchanged.The same CI run also exceeded the unchanged startup JavaScript budget (350,364 B against 350,141 B). That prerequisite is now resolved by landed #138490, merge 7ab8ca3a6b6e, which credits Ayaan Zaidi (@obviyus) and the equivalent work/proof in superseded #138461 and #138472. This PR does not duplicate that repair or change a startup budget. Historically, exact-head CI for
d3f29db68002407ef0cac102d8be6d3b49d3b0eccompleted with 89 successful jobs, the startup-performance failure (350,400 B against 350,141 B), and the resulting aggregate failure; both previously failing test shards passed. Those historical results remain evidence for that revision, not a current blocker description.The retained resume proof for published
14845ee275ad435a0ad481075ab705c4b931272bmeasured 346,223 B gzip, below the original 350,141 B ceiling, with 49 owner/gate cases, 48 browser cases across six files, and 199 decoded frames with no padding flags. These overlap earlier proofs and are not additive distinct totals. No startup budget is changed here.Focused final Logs proof commands:
Final CI repairs and upstream integration
CI 33914894907 exposed two test-lifecycle defects on
14845ee275ad435a0ad481075ab705c4b931272b. Both were independently investigated and published in interim commit05dc7d725ecc108a4a371f8c66444e45f9c380b2(+148/−78 test/support across three files). The final branch is rebased onto05a236c7afbcf1956e40642d4f1777af4a378da3; the first two capture commits remain patch-identical. Its final commit8d74a25c38e3d3a346a0b88f14938a22616f96f6retains only the two-file geometry fix (+73/−15, no product runtime changes). The duplicate Settings delta is removed because main already contains the canonical repair.05dc7d…versions.settings-layout.e2e.test.tsis byte-identical to pinned main, retaining landed #138482, merge3dd2b404c37ddd028d6994b31ee82684c9400efd. It keeps all three cold-boot pages alive through final assertions, preserves aggregate late-startup provider-copy exclusion and rich HTTP/request-failure provenance, and uses fixture-owned failure capture. Our independently proven cold-context/UI-journey alternative from05dc7d…is no longer in the final source. No error-code filters, timeouts, retries, or duplicate coverage were added.Upstream #138482 independently reproduced the same test-owned hard-navigation cancellation on Linux Chromium 144: 298 passed / 1 natural failure before; 299/299 after; focused Settings 6/6. HTTP 503 and connection-reset negative controls still fail with diagnostics; its exact-head CI 33913547937 passed. This is retained upstream proof, not a new Linux run for this branch.
Our independent forensic evidence is also retained: New's composer was ready at 650 ms; hard Chat navigation began at 665 ms. Outgoing scripts received HTTP 200 and were fulfilled at 681/729 ms, then Chromium canceled them with
net::ERR_ABORTEDaround the 760 ms Chat commit. The removed alternative passed 308 tests across 64 files in 33917106725, and seven local Settings cases. Real script-reset negative controls still failed both cold cases as intended. Those results support the diagnosis; they are not claimed as tests of the final Settings implementation.Fresh proof on the final rebased source passed 49 owner/gate cases and 15 browser cases across five files, including the entire unchanged six-case Settings file, original image handoff, capture ancestor/shadow-host/font/DPR/containment and exact crop pixels, and Logs auto-follow/layout. The synthetic recording retains all 174 decoded samples, with no corrupt samples. All 40 stills and seven complete video timelines were visually inspected. These focused reruns overlap historical proof and are not additive distinct-case totals. The normal scoped changed gate passed with the two geometry files plus the preserved Settings conflict surface: core-test/UI types, local oxfmt, type-aware lint/style and repository guards; git diff --check passed. Fresh isolated full-branch review against pinned base
05a236c7afbcf1956e40642d4f1777af4a378da3was scoped-clean at P0, findings[], with source verification, secret scanning, and reviewer isolation retained.ClawSweeper follow-through: the actual conflict was resolved by preserving upstream Settings exactly; current-main refresh and the existing recording/Logs coverage are complete. The existing Photon crop/decode/free contracts were inspected directly and exercised through exact crop/finalized-recording tests. The complete candidate has no new configuration/default, schema or stored-data surface, so the bot's truncated-file compatibility prompts do not apply. Native current-main baseline dbc554b was refreshed and inspected. The relevant Settings, Logs and screenshot-owner source matches the pinned rebase baseline; Settings retains the upstream repair, while main still has the old Logs snapshot initializer and surface-only capture readiness. Required exact-head CI for
8d74a25c38e3d3a346a0b88f14938a22616f96f6: CI run33922243194 is attached via pull_request to the full head SHA; observed queued, final result pending. The parent owns CI watch and the exact-head checkpoint; preparation and merge have not run. Startup prerequisite #138490 remains landed, with the earlier 346,223 B measurement below the original 350,141 B ceiling; this PR changes no budget.Combined proof commands:
node scripts/run-vitest.mjs ui/src/pages/logs/logs-page.test.ts ui/src/pages/logs/view.test.ts ui/src/pages/logs/data.test.ts ui/src/lit/gateway-page-controller.test.ts ui/src/lit/poll-controller.test.ts ui/src/test-helpers/control-ui-e2e.test.ts ui/src/test-helpers/control-ui-e2e-artifacts.node.test.ts OPENCLAW_CAPTURE_UI_PROOF=1 OPENCLAW_UI_E2E_RECORD=1 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-flow.image-handoff.e2e.test.ts ui/src/e2e/initial-connect-splash.e2e.test.ts ui/src/e2e/settings-layout.e2e.test.ts ui/src/e2e/logs-autofollow.e2e.test.ts ui/src/e2e/logs-layout.e2e.test.ts -t 'submitted image|recovery pixels|finalized recording pixels|font pixels|fractional bounds|Control UI settings layout mocked Gateway E2E|returns to the newest line|keeps wrapped filters' node scripts/check-changed.mjs --base 05a236c7afbcf1956e40642d4f1777af4a378da3 -- ui/src/e2e/initial-connect-splash.e2e.test.ts ui/src/test-helpers/control-ui-e2e-screenshot.ts ui/src/e2e/settings-layout.e2e.test.tsScreenshot-induced corruption: before / after
Before: finalized recording frame during a locator screenshot.
After: finalized frame while retaining the same element through a viewport capture and off-browser crop.
Logs proof blocker: before / after
The synthetic call-ordered fixture exposed cancellation of the first request as one row instead of 200. This is not a claim that a real cursorless Gateway request normally returns only an incremental line.