Skip to content

chore(page): switch off the fleet's other header heroes, through each theme - #58

Merged
sydevs-bot merged 5 commits into
mainfrom
claude/fix-37-theme-header-bands
Oct 3, 2026
Merged

sydevs-bot merged 5 commits into
mainfrom
claude/fix-37-theme-header-bands

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The Atlas page now asks Esotera, Fluida, OceanWP and Seva Lite to leave their decorative band out, through the hook each theme publishes for it. Branding and navigation are untouched.
  • Esotera and Fluida left only 170px and 373px for the map, under the widget's floor, so those sites showed a "Find a class near you" button instead of the atlas.
  • Nothing is hidden with CSS, and a theme with no such switch keeps its band — the behaviour before this PR.

Changes

  • includes/page.php — sahaj_atlas_quiet_theme_bands() registers the three filters on template_redirect. The Cryout release class is the second half of that fix, and it rides sahaj_atlas_body_class(), which is already behind the same page gate.
  • tests/browser.mjs — the three known marks 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

  • Lean gate: ✓ pnpm test:all — syntax lint, measure lane, 342 assertions in WordPress 6.7 / PHP 7.4, render lane. 0 failures.
  • Contract step: ✓ tests/atlas-url-contract.json matches SahajCloud's copy.
  • Security review: ✓ triggered on includes/page.php and sahaj-atlas.php, no findings — the new PHP reads no request data and adds no sink.
  • Browser lane: not run. It needs SAHAJ_ATLAS_TEST_KEY, which is local-only, so a cloud session cannot run it.

Manual verification

  1. 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.
  2. Esotera Plus, on one of the four live sites (sahajayoga.com.mt, meditation-png.com, meditation.com.fj, meditation.to): confirm esotera_header_image_url and esotera-metahide-headerimg exist 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_false on 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:221 and atlas-page.js:86 both reject a flat 100dvh for 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 on cryout_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, and esotera_body_classes() adds that class only when esotera_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-headerimage is Esotera's default (admin/defaults.php:36, theme_headerresponsive => 0) and gives #header-image-main-inside a definite theme_headerheight, 550px by default, whether or not a hero prints — so dropping the image alone reclaims nothing. esotera-metahide-headerimg is the theme's own release for that box: style.css:7984 carries height: 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 bare display: none (style.css:5717) when it is. The option is prefixed per theme, so the two defaults.php files do not line up.

Why one gate, not two. Both halves sit behind sahaj_atlas_is_atlas_page(): the image filter inside sahaj_atlas_quiet_theme_bands(), the class inside sahaj_atlas_body_class(). A gate that could drop the class has already dropped sahaj-atlas-page, which the sizing CSS rides on, so a second body_class registration 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 from sahaj_atlas_body_class() fails the Atlas page drops the height that hero reserved; the page gate lifted off it fails another page keeps the height that hero reserved.

Why the known marks go even though the lane did not run. A known cell'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 band flag exists because the lane had a hole. the header sits above the element passes when headerBottom === null — when no header is found at all, which is the one failure switching a band off can cause. Each band cell 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:169 and fluida/includes/core.php:169 (apply_filters( '<theme>_header_image_url', … ), with _CRYOUT_THEME_NAME defined as the slug in each functions.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_Query calls 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 on remove_filter having 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

claude added 3 commits October 2, 2026 01:40
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
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 2, 2026
@sydevs-bot

sydevs-bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

recent dispatches
  • 02:56Z address-review · attempt 1 · session · done
  • 02:56Z address-review · attempt 1 · session
  • 02:44Z adversarial-review · attempt 1 · session · done
  • 02:44Z adversarial-review · attempt 1 · session

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 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-fix page.php:201 — fold the release class into sahaj_atlas_body_class().
  • consider page.php:206 — OceanWP is headroom; #37 allows recording it left alone.
  • consider page.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

Comment thread includes/page.php Resolved
Comment thread includes/page.php Resolved
Comment thread includes/page.php Resolved
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Oct 2, 2026
claude added 2 commits October 2, 2026 03:03
`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
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Addressed the adversarial review. Head is 1f9cd68.

Lean gate: ✓ pnpm test:all, 342 assertions, 0 failures. Contract: ✓. Both new assertions failed once before the fix went back.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 2, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review October 2, 2026 03:11
@sydevs-bot
sydevs-bot requested a review from Ardnived October 2, 2026 03:11
@sydevs-bot
sydevs-bot enabled auto-merge October 2, 2026 03:11
@sydevs-bot
sydevs-bot added this pull request to the merge queue Oct 3, 2026
Merged via the queue into main with commit fd79a08 Oct 3, 2026
27 checks passed
@sydevs-bot
sydevs-bot deleted the claude/fix-37-theme-header-bands branch October 3, 2026 21:21
Ardnived added a commit that referenced this pull request Oct 3, 2026
Ardnived added a commit that referenced this pull request Oct 5, 2026
…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]>
Ardnived added a commit that referenced this pull request Oct 6, 2026
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

chore(page): check the fleet's other themes for a header hero

3 participants