Repository navigation
fix(page): a theme's hero image leaves the atlas too small for the map - #35
Conversation
The classic template called get_header(), and Mesmerize's header.php prints a hero image. On shrimataji.org it took 435px of a 720px screen, leaving the atlas under the widget's 420px floor, so visitors got the compact card's button instead of the map on most laptops and every phone. sahaj_atlas_header_name() maps verified themes to their own hero-less variant, and the template passes it to get_header(). Mesmerize and Mesmerize Pro both ship header-small.php, which is header.php without the hero. Core falls back to header.php when the variant is missing, and every other theme gets null, so nothing else changes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merging this releases the Mesmerize hero fix to every site. Co-Authored-By: Claude Opus 5.5 <[email protected]>
One in_array() over the two Mesmerize slugs reads get_template() once, and the docblock no longer quotes the widget's floor from another repo or claims a wrong entry is free. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…hero The behaviour suite pins sahaj_atlas_header_name(), but reverting the template's get_header() call left it green. The classic run now serves a `mesmerize` fixture theme for one request, through an mu-plugin that filters `template` and `stylesheet` as core's theme preview does. It asserts the fixture's header rendered and its `.header-wrapper` hero did not. Verified to fail with the template's plain get_header() restored. Co-Authored-By: Claude Opus 5.5 <[email protected]>
get_template() matched a Mesmerize child theme too, and get_header('small')
would then load the parent's variant in place of the child's customised
header.php. get_stylesheet() limits the swap to the theme itself. The suite
now pins both a direct theme and its child.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The run carries its hero theme as a field, and the request now asserts a 200, one document, one element below the theme's header, and no hero. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ders page.php and run.php moved under this branch. render.mjs:86 and :233 already pointed at unrelated lines on main. The @Package count was 21 before the new test file and 18 in the rule. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Ardnived
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
This PR is the size of #36: one get_header() argument, a one-line theme match, and a patch release. It drops the hero through core's own header-variant mechanism, with core's fallback to header.php, not through CSS or a setting. The release half is right: all four version declarations read 0.2.1, a grep finds no fifth, v0.2.0 published its zip, and main holds nothing unreleased, so this merge ships exactly this fix, with a changelog a volunteer can read. The test fixture earns its ~60 lines: it is the only check that fails when the template's call reverts, and the behaviour group alone missed that. The open questions are about reach, not shape. The allowlist comes from the one site anyone measured, and the child-theme rule turns the fix off for a child theme that does not override header.php.
Findings
- consider —
includes/page.php:152— a Mesmerize child theme with noheader.phpof its own gets the parent's hero header back. The guard defends against a harm nobody has counted. See the thread. - consider —
includes/page.php:161— the list comes from 1 of 13 sites. Has anyone checked the other twelve for a hero header? See the thread. - consider —
tests/render.mjs:42—heroThemeis a knob with one possible value. The mu-plugin and the assertions hard-code Mesmerize anyway. See the thread.
What was checked
- Ticket and PR. I read #36 (its approach, three acceptance criteria and verification list) against the PR body and the diff at
0553244(7 commits, 15 files, +129/−12). Every code and test file maps to a line of the ticket. The guide upkeep follows from the branch's own line shifts: each new reference inAGENTS.md(page.php:211,render.mjs:107and:298,run.php:270) lands on the ⚠ comment it names, and 22@packageheaders is the right count. - Code, read whole.
includes/page.php,templates/atlas-page.php,includes/embed.php,assets/atlas-page.css,assets/atlas-page.js,tests/render.mjs,tests/render-classic.json, the newtests/fixture-theme.phpandtests/fixtures/mesmerize/*,tests/fixtures/sahaj-classic/*, and the header group intests/run.php. The block-theme path never reaches the changed call, becausesahaj_atlas_template_include()returns early there. A theme outside the list getsget_header( null ), which is the old call exactly. - Contract side. I read
SahajAtlasWeb/docs/embedding.md, "Sizing the element" and "When the slot is too small". A sized map is measured against the 360×420 floors, once, on mount, so #36's diagnosis (285px of height left) matches the contract. This PR changes no surface a host can observe: no script parameter, no sizing rule, no URL. Neither consumer needs a check. The changelog's button copy matchessrc/config/translations.en.json:81("Find a class near you"). - Mesmerize 1.6.99 source (WP.org SVN).
header.phpprints the.header-wrapperhero.header-small.phpis the same file without it, with.header-top small. No free-theme template asks forsmall. The theme's own loader,mesmerize_get_header()(inc/templates-functions.php:123), applies amesmerize_headerfilter and preferspro/header-{name}.php, and core'sget_header( 'small' )skips both. The PR's live probe covered only the rootheader-small.php. I have not flagged it, because manual step 3 (view source after the release) checks what the one Mesmerize Pro site actually renders. - Release (the cut-release checklist). The
Version:header,SAHAJ_ATLAS_VERSION,Stable tagandblock.jsonall read 0.2.1.git grep 0.2.0finds only the previous changelog heading, arelease.ymlcomment andpnpm-lock.yamldependencies. v0.2.0 is published withsahaj-atlas-0.2.0.zip, so the last bump did publish.git log v0.2.0..origin/mainis empty. A patch bump is right for a fix, and no other PR is open.tests/stays out of the zip:.distignorelists it, andpackage.shfails a zip that leaks it. The bump rides in this PR at the owner's request, and the body opens with the release line. - CI. "Lint & test" and "URL contract in sync" pass on head
0553244. I ran no suites locally and probed no live site. - Profile. I read it from
origin/main. It has no learned sensitivities for this repo, so values 1 and 3 and the 2026-09-12 rule on protective machinery guided the judgement calls. The PR had no existing review or bot comment.
🤖 Written by the sydevs autonomous loop — see what this is
| * | ||
| * ⚠ Ask for the theme's own hero-less variant. Do not hide the hero with CSS: the rest of the | ||
| * header is laid out for its variant. Core falls back to `header.php` when the variant is missing. | ||
| * `get_stylesheet()`, not `get_template()`: a child theme's own `header.php` may carry changes the |
There was a problem hiding this comment.
consider — A child theme with no header.php of its own gets the hero back. get_header() resolves through locate_template(), which tries the child's folder, then the parent's. A Mesmerize child that carries only style.css and functions.php gets null here, so core loads the parent's header.php, and the compact card returns. #36's criterion, and the label at tests/run.php:236, say "keeps its own header.php". That assumes the child has one.
The guard protects against a harm nobody has counted: a customised child header.php lost on one page. Does any site in the fleet run a Mesmerize child theme? If none does, get_template() is the same one line, and it covers a CSS-only child. locate_template() would still prefer a child's own header-small.php. If one does, check whether it overrides header.php before you choose.
🤖 Written by the sydevs autonomous loop — see what this is
There was a problem hiding this comment.
Adopted the wording in aa90780: the label now reads "keeps today's header", and #36's criterion matches. Kept get_stylesheet(). A body-class scan of 26 fleet WordPress sites (#37) finds no Mesmerize child theme, so both lines behave the same today. For a future child, get_stylesheet() fails to today's page: the hero, and a working compact card after SahajAtlasWeb#234. get_template() fails by silently swapping a customised header.
🤖 Written by the sydevs autonomous loop — see what this is
A child with no header.php of its own loads the parent's, so "its own" assumed a file the child may not have. Co-Authored-By: Claude Opus 5.5 <[email protected]>
fixture-theme.php accepts only mesmerize and the assertions match its markup, so a heroTheme field could not vary without breaking the check. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Addressed the adversarial review:
Lean gate: 🤖 Written by the sydevs autonomous loop — see what this is |
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]>
* fix(test): pin Playground versions with preferredVersions, not flags 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]> * test(browser): run the production widget in real themes, in Chromium 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]> * docs(test): rewrap the browser lane's header Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(test): address the code review of the browser lane - 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]> * fix(test): judge the plugin by the widget's documented surface 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]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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
Merging this releases v0.2.1 to every site.
Summary
Changes
includes/page.php—sahaj_atlas_header_name()returns'small'for themesmerizeandmesmerize-proactive themes, elsenull.templates/atlas-page.php— passes it toget_header(). Core falls back toheader.phpwhen the variant is missing.sahaj-atlas.php,blocks/embed/block.json,readme.txt— 0.2.1 everywhere, with a changelog entry for volunteers.tests/fixtures/mesmerize/,tests/fixture-theme.php,tests/render.mjs— the classic render run serves a hero fixture theme for one request.Test results
pnpm test:all— syntax lint (12 files), behaviour suite (241 assertions, 0 failures), render checks (0 failures).github/scripts/package.sh—sahaj-atlas-0.2.1.zip, version declarations agree, notests/Manual verification
<div id="page-top" class="header-top small">and noheader-wrapper. This confirms Mesmerize Pro's ownheader-small.phphas no hero, which only the free theme's source could show beforehand.Notes for reviewer
get_stylesheet(), notget_template(): a Mesmerize child theme keeps its ownheader.php, which may carry customisations the parent's variant would drop. The live site runs Mesmerize Pro directly (wp-theme-mesmerize-pro, no child class), and the fleet scan found no Mesmerize child theme. The adversarial review asked forget_template(); that thread stays open for you to settle.header.phpprints a header image. This release stays Mesmerize-only.sahaj_atlas_header_namefilter for other hero themes — rejected: AGENTS.md principles 3 and 4, and no volunteer can use a filter. One release reaches every site.header-small, relying on core's fallback — rejected: only Mesmerize defines that file as "no hero". An unknown theme'sheader-small.phpis a guess.position: absoluteover the hero, and in flow only inheader-small.php.Detail
Evidence. Measured live at 1280×720: the hero (
.header-wrapper) took 435px, leaving the atlas 285px against the widget's 420px floor, so it showed the compact card. Simulated live with the hero removed and the nav.small: the atlas starts at 82px (desktop) and 73px (phone), and the full interface renders at both.header-small.phpexists in Mesmerize 1.6.99 (WP.org SVN) and on the live Mesmerize Pro install (HTTP 200 vs 404 for a missing name).The fixture switch.
tests/fixture-theme.phpis an mu-plugin only the classic render blueprint writes. It filterstemplateandstylesheetfor a request carrying?sahaj_fixture_theme=mesmerize, as core's theme preview does.tests/never ships:.distignoreexcludes it, andpackage.shfails a zip that contains it.Guide upkeep.
AGENTS.md's line references forpage.phpandrun.phpmoved under this branch.render.mjs:86and:233already pointed at unrelated lines onmain. The@packagecount indocs/rules/code-comments.mdread 18 against 21 onmain, and 22 now.Review passes.
/simplify(four lenses) and/code-review highran; thepr-review-toolkitplugin is not installed./security-reviewran (triggered byincludes/andtemplates/): no findings.comment-lintcovers only JS/TS, so it saw no changed file here.Closes #36
🤖 Generated with Claude Code