Repository navigation
Fix library add/update hanging when the screenshot fails (#530) - #531
Conversation
…ls (#530) The library item Update dialog never settled when html2canvas rejected, so it now logs the failure and updates without a screenshot, and closes with an error notice if the post lookup fails. Without a client screenshot, get_save_data() used to send the page HTML, which the cloud cannot screenshot (no Browsershot) and which clears the item's existing thumb. It now omits the screenshot, so the cloud skips it. Upgrades html2canvas-pro to 2.6.3, which parses calc() background positions. The lockfile was generated with --legacy-peer-deps until @beaverbuilder/cloud-ui with the widened peer range is published. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merge CheckState: tested at 57e08e8, lane TLDRAdding a page to a library, or updating a library item, no longer hangs when the page's screenshot fails, and a failed screenshot no longer wipes the item's existing thumbnail. Reviewmerge-check fast review, round 2: Ship, the cloud-ui blocker is fixed at 57e08e8; 1 concern stands (no CI for PHP or lint). Review detailBlockers
Concerns
Verified: fast review · 6 files / +208/-72 lines reviewed. Sanity checkHigh depth (UI), adversarial pass: right approach; nothing hard to reverse, no decision needed. Follow-up worth filing: Sanity check detailLane: ui — Update dialog behavior and its error notice on a failed post lookup; add-to-library and update outcomes a person sees. No irreversible trigger: no stored shape, hook, signature or REST shape changes; the cloud payload only loses an optional key. html2canvas-pro 1.x to 2.x is an upgrade of an existing dependency, not a new one.
Merge contextOverlaps: #519 also edits Test resultsAll 7 test-plan steps pass at 57e08e8 with the published cloud-ui 0.8.74: Test evidenceLocal site (Local, PHP 7.4 for PHPUnit) and the local cloud API, plugin at 57e08e8 built with
Test plan
Agent playbookPreconditions: WordPress site with the Assistant plugin on branch
Run history
bb-merge-check · head:57e08e8 · state:tested · risk:ui |
0.8.74 rejects failed screenshots instead of hanging and passes skipValidation, which html2canvas-pro 2.x needs for the image proxy. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Merge check blocker resolved; ready for another merge check at 57e08e8.
|
right -43px bottom -53px): html2canvas-pro 2.6.3 now parses thecalc()positions Chrome reports for these.Fixes #530.
Depends on beaverbuilder/packages#178 (merged, published)
https://github.com/beaverbuilder/packages/pull/178 holds the other half (the add-to-library and import fallbacks live in
@beaverbuilder/cloud-ui). It is merged and published as@beaverbuilder/cloud-ui0.8.74, and this PR now requires^0.8.74(57e08e8).package-lock.jsonis still generated with--legacy-peer-deps. The cloud-ui peer conflict is gone, but a plainnpm installfails on an older one that main has too:@beaverbuilder/fluid-docs0.0.6 declares@beaverbuilder/icons ^0.0.5, and the repo pinsicons0.0.10.What changed
@beaverbuilder/cloud-ui0.8.73 to 0.8.74: failed screenshots now reject instead of hanging, the add and import paths fall back to uploading without one, and it passesskipValidation, which html2canvas-pro 2.x needs for the image proxy.html2canvas-pro1.5.11 to 2.6.3: 1.x dropscalc()tokens inbackground-positionand crashes withCannot read properties of undefined (reading 'type'). It is a peer dependency of cloud-ui, so assistant's copy is the one bundled intobuild/apps.js. The lockfile drops four 1.x-only dependencies.build/vendor-html2canvas.jsis built from the same package and upgrades with it (about 10KB larger).library-item/form/config/post.js(Update dialog): on a screenshot failure it logs and updates without one. A failed post lookup now shows the existing error notice and closes the dialog instead of leaving it on "Updating...".LibraryItemPostController::get_save_data(): with no client screenshot it used to send the page HTML (ScreenshotHelper::get_for_url()). The cloud API turns that into a Browsershot screenshot, but Browsershot isn't in itscomposer.json, so the request failed after clearing the item's thumb. It now omitsscreenshot, and the cloud skips screenshots when the key is absent. Behavior with a client screenshot is unchanged.The payload sent to the cloud can now lack the
screenshotkey; the cloud already handles that (CreateLibraryItemScreenshotreturns early).Testing
Done on a local site against the local cloud API, with the cloud-ui build from beaverbuilder/packages#178 in place of the published package. Test page: an HTML module with
background:url(...) no-repeat right -43px bottom -53px.Retested on 2026-11-18 with the cloud-ui build from beaverbuilder/packages#178 and html2canvas-pro 2.6.3: all of the above pass. Not retested: importing an XML file into a library.
LibraryItemPostSaveDataTest(3 tests) passed and failed 2 of 3 on the old controller. Full PHPUnit suite: no new failures.🤖 Generated with Claude Code