Repository navigation
chore(page): switch off the fleet's other header heroes, through each theme - #58
Conversation
Four of the fleet's themes print a decorative band above the content: Esotera and Fluida a header image, OceanWP and Seva Lite a page-title bar. The browser lane measured the result — 170px left for the map on Esotera, 373px on Fluida, both under the widget's floor, so the visitor gets a "Find a class near you" button instead of the atlas. `sahaj_atlas_quiet_theme_bands()` switches each band off on the Atlas page, through the hook that theme publishes. Nothing is hidden with CSS, and no branding or navigation is touched: the masthead with the logo and the menu is printed before the band in all four themes and survives untouched. Esotera needs two switches, not one. Filtering the image away is deliberate where removing the `cryout_headerimage_hook` action would read as shorter: the theme adds `esotera-over-menu` only when that same filter yields an image, and that class is what lifts the masthead out of flow and recolours its text to read against the image. Remove the action instead, and the menu is left light-on-light over nothing. The second switch is the body class, because `esotera-cropped-headerimage` — the theme's default — gives the now-empty box a definite 550px, so dropping the image alone reclaims nothing. Both switches are the theme's own: the filter it applies, and the rule its own stylesheet carries. OceanWP and Seva Lite each switch off through one filter the theme gates its title bar on. OceanWP's band fits today at both measured viewports, so that one is headroom rather than a fix; Seva Lite's does not fit at 1366x650. Verified by reintroducing each half: with the page guard gone the filters land on every page, with the filters gone the Atlas page keeps all four bands, and with the class written unconditionally a non-Cryout theme gets one too. The browser lane cannot run in a cloud session — it needs a test key that is local-only — so the three `known` marks it no longer needs are removed on the strength of each theme's source, and the four cells now carry `band: true`. That flag adds the assertion the lane was missing: its header check passes when no header is found at all, which is the one failure this change could cause. Refs #37 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HYTnJvxVF6Q3qHxGmXVxmh
…any page Both negative cases queried a page archive, where `sahaj_atlas_is_atlas_page()` returns false before it compares ids — so they passed however broken the comparison was. Weakening the guard to a bare `is_page()` now fails five assertions, including the body-class one that has been vacuous since it was written. The browser lane's `band` flag carries the band's own selector instead of `true`. Two of the four bands are themselves a `<header>`, so the masthead assertion could not tell a surviving masthead from a surviving band; the selector assertion in front of it is what makes the second one mean anything. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HYTnJvxVF6Q3qHxGmXVxmh
…s it Per the /simplify and /code-review passes. The Cryout fix was spelled twice — a `defined( '_CRYOUT_THEME_NAME' )` guard in `sahaj_atlas_quiet_theme_bands()` for the image, another in `sahaj_atlas_body_class()` for the box the image left behind — so the two halves of one mechanism were free to disagree, which is the shape trap 25 objects to. `sahaj_atlas_quiet_theme_bands()` now registers both, the second as its own `body_class` filter, so the release class is added exactly where the image was dropped. `sahaj_atlas_body_class()` goes back to marking the Atlas page. The suite walks one `sahaj_band_switches()` list three times instead of naming each hook three times, so a fifth theme is one row. It queries pages through `sahaj_query_page()`, the helper whose own docblock exists to stop a second spelling, and compares against a page it creates rather than whatever the fixture site happens to have published — which also drops an assertion that tested the fixture. The browser lane counts the band inside the `measure()` snapshot it is judged beside, rather than in a second round-trip taken after the screenshot. Trap 26 and three comment blocks said the same thing in triplicate. The trap now states the trap and points at the two ⚠ lines, as the entries around it do. Refs #37 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HYTnJvxVF6Q3qHxGmXVxmh
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The diff is the size of #37 and no larger, and honours the ticket's decision: four switches the themes publish, behind the page gate the plugin already has. I verified every hook name, both band selectors and the release class against the shipped free themes — the PR's one unverified claim — and all four hold. One layer need not exist, and one theme is headroom rather than a fix.
On the CSS floor the body raises: file it, do not widen this PR. The reason atlas-page.css:42 refuses flat 100dvh does extend to a floor, it just becomes the lesser evil. That trade changes the degradation on every theme, so it earns its own review.
Findings
should-fixpage.php:201 — fold the release class intosahaj_atlas_body_class().considerpage.php:206 — OceanWP is headroom; #37 allows recording it left alone.considerpage.php:217 — Fluida's default header mode is inverted in the body.
Checked: includes/page.php, tests/run.php, atlas-page.css, #37, no contract. Hooks read from the wordpress.org free themes.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`sahaj_atlas_body_class()` is already a global `body_class` filter behind `sahaj_atlas_is_atlas_page()`, the same gate `sahaj_atlas_quiet_theme_bands()` uses. Registering a second `body_class` callback beside the image filter bought nothing: the two gates can only disagree in a way that also drops `sahaj-atlas-page`, which the sizing CSS rides on. Three lines replace a function, a registration and a test row. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_013Y2SZimEF3Twx19hR7g8fy
Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_013Y2SZimEF3Twx19hR7g8fy
|
Addressed the adversarial review. Head is 1f9cd68.
Lean gate: ✓ 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ind the script row by word (#59) Two lane bugs, both surfaced by the first full run after #58: - Fluida's desktop `<header id="masthead">` measures 0px, with its menu in a fixed child, so "its masthead outlived the band" failed on a page whose masthead is plainly there. A zero-height header is now measured by its children. - The status-panel lookup `/script/i` matched "Page description", so the strip-module cell's "script row is red" and every "script row is green" read the wrong row. It now matches the word. Co-authored-by: Claude Opus 5.5 <[email protected]>
* chore(release): 0.3.0 Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(readme): the 0.3.0 entry for #58 Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(readme): the 0.3.0 entries for #61 Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
Changes
includes/page.php—sahaj_atlas_quiet_theme_bands()registers the three filters ontemplate_redirect. The Cryout release class is the second half of that fix, and it ridessahaj_atlas_body_class(), which is already behind the same page gate.tests/browser.mjs— the threeknownmarks are gone, and the four cells carry the band's own selector.AGENTS.md— trap 26.readme.txt— the volunteer-facing FAQ entry for a missing header image.Test results
pnpm test:all— syntax lint, measure lane, 342 assertions in WordPress 6.7 / PHP 7.4, render lane. 0 failures.tests/atlas-url-contract.jsonmatches SahajCloud's copy.includes/page.phpandsahaj-atlas.php, no findings — the new PHP reads no request data and adds no sink.SAHAJ_ATLAS_TEST_KEY, which is local-only, so a cloud session cannot run it.Manual verification
pnpm test:browser --only esotera,fluida,oceanwp,seva-lite— the four cells now assert, not report. This is the acceptance criterion this run could not reach.esotera_header_image_urlandesotera-metahide-headerimgexist in the paid edition. Only the free edition was read.Notes for reviewer
One decision to check, one question raised.
The decision: OceanWP and Seva Lite are both switched off, rather than one being recorded as left alone. Seva Lite goes compact at 1366×650, so it is a fix. OceanWP's 205px band fits at both measured viewports, so that one is headroom — one
__return_falseon the filter OceanWP already uses for its own distraction-free modes. Say so if you would rather it kept its band.Fluida keeps its breadcrumbs, per the decision in the ticket, so ~60px still sits above its map.
The question, raised by the altitude review and not acted on: the defence here scales by enumeration — four named themes, a lane that measures free editions, and an Esotera Plus where the lever is unconfirmed. A floor in
assets/atlas-page.css(height: max(<the widget's map floor>, calc(100dvh - var(--sahaj-atlas-top)))) would cover every theme forever, degrading to "the map's bottom edge is below the fold" instead of "no map at all".atlas-page.css:221andatlas-page.js:86both reject a flat100dvhfor reasons that do not obviously extend to a floor that engages only where the alternative is the compact card. Worth settling before the list grows a fifth theme — and if the answer is still no, trap 26 is where it should be written down.Detail
Why a filter and not
remove_action. The ticket's decision said to remove the action oncryout_headerimage_hook. Reading Esotera's source, that is the wrong half:esotera-over-menu, on by default (theme_menuposition => 1), lifts the masthead out of flow and recolours its text to read against the image, andesotera_body_classes()adds that class only whenesotera_header_image_url()yields an image (includes/custom-styles.php:30). Unhooking the printer leaves the class on and the menu light-on-light over nothing. Filtering the URL away suppresses both.Why two switches for one theme.
esotera-cropped-headerimageis Esotera's default (admin/defaults.php:36,theme_headerresponsive => 0) and gives#header-image-main-insidea definitetheme_headerheight, 550px by default, whether or not a hero prints — so dropping the image alone reclaims nothing.esotera-metahide-headerimgis the theme's own release for that box:style.css:7984carriesheight: 0, and no PHP in the free theme writes the class. Fluida defaults to the responsive mode instead (admin/defaults.php:88,fluida_headerresponsive => 1), where an empty box collapses on its own, so the class is only load-bearing there if a site switched to cropped — and Fluida's rule is a baredisplay: none(style.css:5717) when it is. The option is prefixed per theme, so the twodefaults.phpfiles do not line up.Why one gate, not two. Both halves sit behind
sahaj_atlas_is_atlas_page(): the image filter insidesahaj_atlas_quiet_theme_bands(), the class insidesahaj_atlas_body_class(). A gate that could drop the class has already droppedsahaj-atlas-page, which the sizing CSS rides on, so a secondbody_classregistration bought nothing it does not already have.Verified by reintroducing each defect, as the testing rules require: the page guard weakened to a bare
is_page()fails five assertions (including the body-class one, vacuous since it was written, which this PR also fixes); the filters removed fails the three positive assertions; the release class dropped fromsahaj_atlas_body_class()failsthe Atlas page drops the height that hero reserved; the page gate lifted off it failsanother page keeps the height that hero reserved.Why the
knownmarks go even though the lane did not run. Aknowncell's fit failures are reported and swallowed. Leaving the marks on a cell that should now pass hides the next regression there; removing them makes a local run say so out loud. The lane is not in CI, so this costs nothing but a maintainer's next local run.The
bandflag exists because the lane had a hole.the header sits above the elementpasses whenheaderBottom === null— when no header is found at all, which is the one failure switching a band off can cause. Eachbandcell now asserts the band's own selector matches nothing and that a header is still found. Two of the four bands are themselves a<header>, so the second assertion only means "masthead" once the first holds.Source read for each hook, free editions from wordpress.org:
esotera/includes/core.php:169andfluida/includes/core.php:169(apply_filters( '<theme>_header_image_url', … ), with_CRYOUT_THEME_NAMEdefined as the slug in eachfunctions.php:12);oceanwp/inc/helpers.php:2095;seva-lite/inc/extras.php:564. The filters are not gated on the active theme — one nobody applies costs nothing, and a theme gate is a second list to drift.Not acted on: reordering the suite's three
WP_Querycalls down to two. The current order proves the switches are absent on another page before it proves they are present on the Atlas page, so the negative case does not depend onremove_filterhaving worked. One query in a test run is not worth trading that for.Closes #37
🤖 Generated with Claude Code
https://claude.ai/code/session_013Y2SZimEF3Twx19hR7g8fy