Commit 875b0da
Agents Manager: Pivot from cookie to open state option when injecting sidebar docking classes (#49439)
* Move to transient instead of cookie and add a CSS signal to indicate the window is too short for docking
* Agents Manager: cross-link the too-short class with the Calypso CSS variable
Add an X-REF note on print_sidebar_open_sync_script pointing at the Calypso
package's $dock-too-short-class SCSS variable, since the two are coupled only by
the class-name string and won't fail loudly on drift.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Agents Manager: move reconciler to a standalone JS file, drop resize listener
Extract the pre-paint dock-height reconciler out of the PHP heredoc into
src/js/sidebar-dock-reconciler.js and inline its contents (read from disk) so it
still runs render-blocking before paint with zero request cost, while being a
real lintable file. Also drop the resize listener — only the mount-time
reconciliation is wanted; in-session changes are the hook's job.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Use an external script for the dock reconciler
* Rename script
* Finter linter offences
* Fix tests
* Remove Covers attribute
* Fix tests
* Delete classes on mount rather than adding a new one, following the same conditions from Calypso
* Agents Manager: fix sidebar pre-render on Simple sites and harden the docking gate
- Open_State_Store::get_cached() reads `calypso_preferences` directly on wpcom
Simple sites, where the frontend talks to the wpcom endpoint directly and never
primes the local transient — so the server-side pre-render sees the real
open/docked state instead of always treating it as unknown.
- The pre-paint docking gate now re-checks the fullscreen gate as body classes
settle (gated screen classes / is-fullscreen-mode can land after the first run),
floats the chat when the gate closes, and disconnects once the shell is gone or
the app mounts — bounded, layout-free, and loop-free. Adds tests for both.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Welly Shen <welly.shen@automattic.com>
Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/27583284003
Upstream-Ref: Automattic/jetpack@588d8281 parent 2da9c49 commit 875b0da
0 file changed
0 commit comments