Repository navigation
test(browser): run the real widget in real themes, in a browser - #44
Conversation
The guide said `server` ignores a blueprint's `preferredVersions` and to pass `--php`/`--wp` instead. Under @wp-playground/cli 3.1 the reverse holds: given a blueprint, the flags are ignored, and a blueprint without the key boots WordPress 7.1 on PHP 8.5. Measured: render-classic.json with `--php 8.3 --wp 7.1` serves WordPress 6.7.9 on PHP 7.4.33; the same blueprint without the key, with `--php 7.4 --wp 6.7`, serves 7.1.2 on 8.5.8. The render lane was right only because both blueprints carry the key. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A fourth lane, `pnpm test:browser`, local only. Each cell boots a Playground WordPress 6.7 / PHP 7.4 with a theme from wordpress.org, loads the Atlas page in Chromium with the production widget (clients/me and clients/report stubbed, PHP still offline), and measures at four viewports: whether the interface or the compact card rendered and why, the slot against the widget's floors, the header against the element, hit-testing of the search box and the compact overlay's chrome, portal placement, and probes for host CSS reaching the widget. Screenshots go to a gitignored directory. Cells: the eleven free themes the fleet runs, Elementor and Beaver Builder Lite on WordPress 6.8, and hostile conditions (async CSS, a fixed header, a 62.5% root font, a z-index wrapper, the admin bar, a stripped module tag). Verdicts: FAIL is the plugin's and fails the run; KNOWN is an exposure already ticketed (#35, #37, #40); WIDGET is a production-widget finding (sydevs/SahajAtlasWeb#234, #236, #238 and #239 in that repo). First full run: 0 failures, 47 known, 109 widget findings. Closes #38 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- A `known` cell no longer waives invariants. Checks split into `ok` (served, PHP never reached SahajCloud, no error panel — fail everywhere), `fit` (how the page fits the theme — KNOWN in a ticketed cell) and `widget`. Verified: a known cell whose PHP calls SahajCloud now fails. - Chromium launches once, before any server, and a failed launch names the install command instead of orphaning a server. AGENTS.md documents `pnpm exec playwright-core install chromium` and states the GL trap correctly: headless Chromium needs the software-GL flags. - The header probe ignores headers inside the widget. - `--only` refuses an empty or unknown cell name instead of a green no-op. - Escape closing the overlay is the widget's verdict, not the plugin's. - The sidebar check confirms the card is the card, not any unlabelled button in a full interface. - A server that exits fails its cell at once, with its output saved. - The two API stubs live in one helper. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ardnived
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
Holistic assessment. The size and scope match #38. The PR is one self-contained lane script, one dev dependency and a row in the guide, inside the owner's limits: free themes, the production widget with its API stubbed, and local only. The preferredVersions correction rides along with a measurement behind it, and it belongs here. The shape problem is in how the lane decides what the widget did. It reads vaul, Radix and data-sy-* internals, and it re-derives embed-slot.ts's floors, when the embed contract already publishes that verdict as a [sahaj-atlas] console warning. As a result, a production widget deploy can raise a plugin FAIL, and one viewport can fail the plugin on the best page it can produce. Fixing that makes the lane smaller. Separately, the branch is stale. #35 merged under four minutes before this PR opened. The PR conflicts with main, CI's Lint & test has never run on its head, and the Mesmerize cell still mutes the regression this lane exists to catch.
Findings
- should-fix —
tests/browser.mjs:123: Mesmerize'sknownoutlived #35. Rebase (the conflict is inAGENTS.md, whererender.mjs:102becomes:105), drop theknown, and put the evidence for acceptance criterion 2 in the PR body.strip-module(:141) cites no ticket either. - should-fix —
tests/browser.mjs:447: the plugin's interface/compactFAILis keyed on undocumented widget DOM. Read the compact console warning the contract publishes instead. - should-fix —
tests/browser.mjs:455: the floor check re-derivesembed-slot.tswith a bare0.8and a+ 100. At 844×390, with less than 78px above the element, it fails the plugin exactly where the widget correctly keeps the interface. - consider —
tests/browser.mjs:544: "the overlay opens" is anokinvariant that noknowncan mute, keyed on[data-sy-expanded]. It is not one of the guide's invariants. - consider —
tests/browser.mjs:271:allowedDomains: 'localhost'is what keeps Fathom off, and nothing says so.localeis dead, and no doc names the key's client record. - consider —
tests/browser.mjs:633:--php/--wpflags that the line above them says are ignored. - consider —
tests/browser.mjs:717: "to file in SahajAtlasWeb" asks for duplicate tickets from the second run on.
What was checked
- Ticket and PR. I read #38 in full (approach, the four acceptance criteria, the verification checklist and the owner's decisions), then the PR body and the full diff
origin/main...1b96582: 6 files, 4 commits, merge-basea147091. - Read whole.
tests/browser.mjs(all 718 lines),tests/render.mjs,tests/no-network.php,tests/render-classic.json,AGENTS.md(Testing, traps),docs/rules/code-comments.md,package.json,.gitignore,.distignore,.github/scripts/package.sh,.github/workflows/ci.ymlandassets/atlas-page.{css,js}. I checked the handles the hostile mu-plugins target againstincludes/embed.php:56,370. Modulesahaj-atlasgives the idsahaj-atlas-js-module, and the style handle issahaj-atlas-page. Both match. - Contract side, SahajAtlasWeb
origin/main.src/lib/embed-slot.ts: floors 360/420 andSLOT_GAIN0.8.embedLayoutdegrades only when there is a destination.src/lib/slot-decision.ts: the viewport isinnerWidth/innerHeight, the slot is the element's box, and the warning isCOMPACT_MESSAGE.src/lib/report.ts:627prints it with the[sahaj-atlas]prefix.src/types/client.ts(ClientSchema, which has nolocale) andsrc/config/api/fetch.ts(getClient).src/lib/shape/routing.ts:mountPrefixaccepts the stub's127.0.0.1:<port>/find-a-class.src/views/FullInterface.tsx:61: the localhost gate on analytics.docs/embedding.mddocuments.sy-atlas,data-sahaj-atlas-ready,Atlas Rethink Sansand the compact console warning. It does not documentdata-vaul-drawer,data-sy-frame,data-sy-expandedor Radix ids.- SahajAtlasWeb has no browser lane of its own (vitest only), so the
widgetprobes have no other home. That is why finding 7 is about wording, not existence.
- Queries.
gh pr view 44:CONFLICTING.git merge-tree origin/main origin/test/browser-lane: the only conflict isAGENTS.md, and the mergedrender.mjsputs the trap comment at:105.- Check runs on
1b96582: dispatch and Workflow state only, with noLint & test. - #35 merged at 16:58Z, and this PR opened at 17:01Z. #37 and #39–#43 are open. SahajAtlasWeb #235, #236, #238 and #239 are open.
- Ran, read-only.
pnpm test:browser --listlists 19 cells, 6 of them known.--only nopeexits 2 with a usage line.node --check tests/browser.mjspasses. I did not run the full lane, since it needs the key and takes about 15 minutes. - Looked at and not flagged, on purpose.
- The owner's three decisions.
- The ticket's 80%-of-height assertion, downgraded to
info. That is right, because 80% alone never degrades the widget. - 1366×650 in place of the ticket's 1366×768. It is harsher, not weaker.
- What ships:
.distignorealready dropstests/,package.jsonand the lockfile, so nothing new reaches the zip. .env.claude.local, which is the workspace's existing credential file (SahajClouddocs/environment.md).- Unpinned wordpress.org themes, which is consistent with "test what sites get".
- The
pnpm-lock.yamlentries, which are consistent.
- Profile. I read
reviewer-profile.mdfrom claude-workfloworigin/main. It records no SahajAtlasWordpress sensitivities, so values 1, 2 and 4 and the 2026-09-12 and 2026-09-20 refinements steered this review.
🤖 Written by the sydevs autonomous loop — see what this is
# Conflicts: # AGENTS.md
From the adversarial review of #44: - The plugin's verdicts no longer read widget internals. The compact-card decision comes from the warning the embed guide documents; the size check is the plugin's own contract — the element runs to the viewport's bottom — instead of a copy of the widget's floors. A landscape phone at 844×390 can no longer fail the plugin for a decision the widget made correctly. - Every overlay verdict, including opening it, is the widget's. - Mesmerize is no longer `known`: #35 shipped, and the cell now passes. `strip-module` cites SahajAtlasWeb#239. - The client stub says why `allowedDomains: 'localhost'` matters (it keeps the widget's analytics off), drops the unread `locale`, and names the SahajCloud client the test key belongs to. - The ignored `--php`/`--wp` flags are gone; the summary no longer asks for duplicate tickets. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Addressed the adversarial review: all seven threads adopted in 4e86657 (after merging The new "runs to the bottom of the screen" check then caught a real defect on four themes: #46, fixed in #48. Lint & test: green. 🤖 Written by the sydevs autonomous loop — see what this is |
#40 names Astra, OceanWP and Elementor transparent headers. Elementor's theme builder prints its header into a plain `div` with `data-elementor-type="header"`, which none of the three existing selectors reach, so that case was left under the header. The selector matches the one PR #44's browser lane already uses. The stubbed lane cannot tell the selectors apart, so this rides on the guards the other scenes pin: out of flow only, above the atlas, inside the top half. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_015QGDLmYDuvjPYCqBRejoAz
The ⚠ said #38 retires the file. #38 is PR #44, which adds `pnpm test:browser` to `package.json` alone — not to `pnpm test:all`, not to CI, and it needs a key and the network. So this lane is the only CI coverage the one shipped script has, and "do not grow it" was the wrong instruction for it. It now retires on a condition rather than on a ticket: a browser lane in CI, covering the same decisions. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_015QGDLmYDuvjPYCqBRejoAz
PR #44 landed the browser lane and PR #48 changed the Atlas element's display, so `package.json` and `AGENTS.md` both conflicted. `package.json` keeps both lanes: `test:browser` from main, and `test:measure` inside `test:all` from this branch. The browser lane stays out of `test:all` — it needs a key and the network. `AGENTS.md` keeps every trap from both sides. The lane counts are rewritten rather than taken from either side, because neither was right after the merge: four lanes run on wp-playground and the fifth runs in plain node, and `test:all` runs the first four, not the first three. The measure lane's ⚠ no longer says PR #44 fails to retire it; the reason is now that the browser lane is local-only, which is what the ⚠ has to say once #44 is merged. `assets/atlas-page.css` merged clean, and its two changes are independent: `flow-root` stops a child margin escaping, while this branch's `margin-top` on the same element still collapses with a parent's, which is the case the additive offset walk exists for. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AhtySqkGuL4p924YTbLZZh
The cell was marked `known: … (#40)`, so a header covering the map was reported and waived. This branch fixes #40, and the cell now passes with the mark off — verified in the browser lane on 86e796d merged with main, WordPress 6.7.9, at all four viewports, alongside astra, oceanwp, mesmerize, twentytwenty, twentytwentyfive and elementor. Leaving the mark would waive the regression it was raised for, the day after the fix shipped. The same precedent is mesmerize in #44, unmarked once #35 shipped. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01263tuCiYUDFZ5sNT3evNeg
Summary
pnpm test:browser: the production widget in Chromium, in every free theme the fleet runs, measured at four viewports.preferredVersionspins versions;--php/--wpare ignored when a blueprint is given.Changes
tests/browser.mjs— the lane. One Playground server per cell (WordPress 6.7.9 / PHP 7.4, theme from wordpress.org, PHP offline throughtests/no-network.php), one Chromium,clients/meandclients/reportstubbed, every other widget read real.package.json—[email protected](dev only; the zip ships nopackage.jsonornode_modules) and thetest:browserscript.AGENTS.md— the lane in the Testing table, its three verdicts, its setup, and two corrected traps.tests/render.mjs— the correctedpreferredVersionscomment. No behaviour change.Test results
pnpm test:all— 12 files linted, 236 assertions, 0 render failuresManual verification
pnpm exec playwright-core install chromiumonce, and keepSAHAJ_ATLAS_TEST_KEYin.env.claude.local.pnpm test:browser --list, thenpnpm test:browser --only astra,esotera. Astra passes (its WIDGET lines are SahajAtlasWeb's), Esotera reports KNOWN, and screenshots appear intests/screenshots/.Notes for reviewer
FAILis the plugin's and fails the run.KNOWNcovers fit checks in a cell whose exposure is ticketed; invariants still fail there (verified: a known cell whose PHP calls SahajCloud fails).WIDGETis a production-widget finding, printed and counted, never red.a,button,h2) — fix(ui): host CSS without !important still restyles widget text SahajAtlasWeb#236.type="module"leaves a blank slot — fix(widget): three host conditions leave a blank slot, unreported SahajAtlasWeb#239..sy-atlasin all 19 overlays — fixed by fix(widget): compact card's overlay opens with no interface SahajAtlasWeb#234, not yet deployed./code-review highran; its findings are adopted infix(test): address the code review of the browser lane. Rebutted: sharingwaitForwithrender.mjs. Each lane script is self-contained by this repo's pattern, andrender.mjsruns on import, so it cannot export a helper.Detail
Cells. Free fleet themes: astra, oceanwp, mesmerize, esotera, fluida, popularfx, seva-lite, enigma, twentytwenty, twentytwentyfour, twentytwentyfive. Builders on WordPress 6.8: Elementor, Beaver Builder Lite. Hostile conditions, as mu-plugins: async CSS, a fixed header, a 62.5% root font, a z-index content wrapper, the admin bar, a stripped module tag. Paid themes (Mesmerize Pro, Esotera Plus, Uncode, JupiterX, Themify Ultra) and builders (WPBakery, Divi) are out by decision; a gitignored mount can add them later.
Measured per cell and viewport (1280×720, 1366×650, 390×844, 844×390): whether the interface or the compact card rendered and the widget's own console reason; the element against the 360×420 floors; the header's bottom against the element's top;
elementFromPointat the search box; every drawer or Radix dialog inside.sy-atlas; nothing on<html>; font, list-style and icon-fill probes; the side panel's width. A landscape phone is allowed the card by the widget's own rule; the lane then opens it and judges the overlay.The version finding. Every cell first ran WordPress 7.1.2 on PHP 8.5.8 despite
--php 7.4 --wp 6.7. Measured:render-classic.jsonwith--php 8.3 --wp 7.1serves 6.7.9 on 7.4.33; withoutpreferredVersions, with--php 7.4 --wp 6.7, it serves 7.1.2 on 8.5.8. The render lane was right only because its blueprints carry the key.Runtime. About 20s to boot a cell (theme download included), 40–50s per cell with four viewports.
Closes #38
🤖 Generated with Claude Code