Skip to content

Share identical headers whose captured dialog ordinal differs per route - #3553

Merged
chubes4 merged 1 commit into
trunkfrom
fix/issue-3549-blocks-engine
Oct 27, 2026
Merged

chubes4 merged 1 commit into
trunkfrom
fix/issue-3549-blocks-engine

Conversation

@chubes4

@chubes4 chubes4 commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Shell extraction refused to share a header across routes when the only difference was the capture's ordinal dialog panel handle (data-blocks-engine-capture-dialog-N in the panel id, the panel attribute and the trigger's aria-controls). Shell identity now ignores that ordinal in the same normalization that #2960 added for the projector's hashed dialog id, so such headers become one shared header template part. Before: the 3-page fixture's diagnostic listed only [{"area":"footer","slug":"footer"}]. After: a header part (3/3) and a footer part, with page and front-page including both.

What changed

  • normalizeNestedChromeMarkup() in ShellExtraction.php maps data-blocks-engine-capture-dialog-<N> to the bare handle for identity only, so the id and every reference to it normalize the same way. It uses CaptureEvidence::DIALOG_CLASS rather than spelling out the name.
  • Emitted markup is unchanged: the shared header part keeps the first route's handle on both the panel id and the panel attribute.
  • New regression test tests/unit/captured-dialog-ordinal-shared-header.php (registered in composer.json) uses the issue's 3-page fixture. It checks that the header and footer parts are shared and that page/front-page include both, plus a negative control: headers whose dialogs differ in content stay unshared.
  • Additive: only shell identity comparison changes. Headers that differ in anything other than the ordinal dialog handle are still not shared.

Verification

  • passed on b7585ca. Base trunk@4f62f31 unchanged.
set -e
cd php-transformer
(test -d vendor || composer install --no-progress --no-interaction)
( while sleep 60; do echo "gate heartbeat: composer test still running"; done ) &
hb=$!
trap 'kill $hb 2>/dev/null || true' EXIT
composer test
  • CI: pending
Cook run
  • Gate 1: tree 0dfaf5720227da8e0551e2b6801a333df690df9c, fingerprint dd6dfeca89aecb9eef915019bb3abf5b615a71f72597b42fabbc82ded983d239

AI assistance

Tool: Homeboy (pi) · Model: claude-opus-5-5 (tier roadie/cook-heavy) · Used for: The AI read the existing #2960 normalization, wrote the reduced-fixture regression test with a negative control, applied a one-line normalization fix, and ran the php-transformer suite.

Closes #3549

@chubes4
chubes4 merged commit 20d773d into trunk Oct 27, 2026
15 checks passed
@chubes4
chubes4 deleted the fix/issue-3549-blocks-engine branch October 27, 2026 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Shared header not extracted when the capture numbers its dialog panel per route (capture-dialog-N)

1 participant