You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The server-rendered re-render mode — the bridge's findChangedUnit diff that picks the smallest changed unit and does a targeted outerHTML swap instead of a full-page innerHTML swap (packages/hydra-js/hydra.src.js, the onEditChange → POST /render → swap handler) — has zero CI coverage.
It's only invoked by pure-SSR frontends that register a server-render endpoint (astro, nextjs). Reactive frontends (mock, nuxt) never call it. And the SSR frontends have no CI-gated admin tests:
admin-nextjs / admin-f7 projects exist but run in no CI job (opt-in only).
There is no admin-astro project at all.
This was made concrete in #236: findChangedUnit only scanned the items region, so editing a block in a non-items region (e.g. a footer) returned { unit: 'page' } → a full-page swap that destroys the contenteditable cursor every keystroke. That bug could only be caught by a unit test (packages/hydra-js/findChangedUnitRegions.test.js) — there was no integration path to exercise it, because the one render mode that uses findChangedUnit isn't tested end-to-end anywhere.
Why we can't just run the existing admin suite on astro today
The astro example (docs/examples/test-astro, the architecture proof from #229, "commit 1/3") isn't complete enough:
It is items-only — src/pages/api/render.ts literally types its input as blocks_layout: { items: string[] }, so it has no concept of a footer (or any multi-region) layout. (The same .items assumption we've been hunting elsewhere.)
The renderer is generic/minimal — it doesn't handle the block types the integration suite needs (columns, grid, teaser, listing, …).
So running the admin suite against it today would fail across the board for missing-renderer reasons, not real bugs.
Multi-region rendering: walk blocks_layout.<region> (items, footer, …), not just items, in render.ts + [...slug].astro (mirror the test-frontend / nuxt footer-region rendering, incl. a #footer-content area).
Block-type coverage the integration suite exercises (slate, columns, grid, teaser, listing, …) — enough to pass tests-playwright/integration.
Add an admin-astro Playwright project (modelled on admin-nuxt) pointing the iframe at the astro frontend, with its webServer entry gated like the other example frontends.
Add a parallel CI job (test-astro-admin) running the integration suite (or a focused subset that drives editing) against astro.
Payoff
Turns the entire SSR re-render mode from a CI blind spot into covered.
Follow-up from the review of #236 (region-aware nested-container merge + page-level findChangedUnit). Tracks the only piece of regions-awareness we deliberately left to a unit test because no SSR integration coverage exists yet.
Problem
The server-rendered re-render mode — the bridge's
findChangedUnitdiff that picks the smallest changed unit and does a targetedouterHTMLswap instead of a full-pageinnerHTMLswap (packages/hydra-js/hydra.src.js, theonEditChange→ POST/render→ swap handler) — has zero CI coverage.It's only invoked by pure-SSR frontends that register a server-render endpoint (astro, nextjs). Reactive frontends (mock, nuxt) never call it. And the SSR frontends have no CI-gated admin tests:
admin-nextjs/admin-f7projects exist but run in no CI job (opt-in only).admin-astroproject at all.This was made concrete in #236:
findChangedUnitonly scanned theitemsregion, so editing a block in a non-itemsregion (e.g. afooter) returned{ unit: 'page' }→ a full-page swap that destroys the contenteditable cursor every keystroke. That bug could only be caught by a unit test (packages/hydra-js/findChangedUnitRegions.test.js) — there was no integration path to exercise it, because the one render mode that usesfindChangedUnitisn't tested end-to-end anywhere.Why we can't just run the existing admin suite on astro today
The astro example (
docs/examples/test-astro, the architecture proof from #229, "commit 1/3") isn't complete enough:src/pages/api/render.tsliterally types its input asblocks_layout: { items: string[] }, so it has no concept of afooter(or any multi-region) layout. (The same.itemsassumption we've been hunting elsewhere.)So running the admin suite against it today would fail across the board for missing-renderer reasons, not real bugs.
Scope
blocks_layout.<region>(items, footer, …), not justitems, inrender.ts+[...slug].astro(mirror the test-frontend / nuxt footer-region rendering, incl. a#footer-contentarea).tests-playwright/integration.admin-astroPlaywright project (modelled onadmin-nuxt) pointing the iframe at the astro frontend, with its webServer entry gated like the other example frontends.test-astro-admin) running the integration suite (or a focused subset that drives editing) against astro.Payoff
columnstest added in fix(helpers): region-aware nested-container merge in expandTemplates(Sync) #236 would then exercisefindChangedUnitend-to-end on astro for free — no SSR-specific test needed.itemsregion not handled in the targeted-swap path" that fix(helpers): region-aware nested-container merge in expandTemplates(Sync) #236 had to guard with a unit test.Context
Follow-up from the review of #236 (region-aware nested-container merge + page-level
findChangedUnit). Tracks the only piece of regions-awareness we deliberately left to a unit test because no SSR integration coverage exists yet.