Conversation
preloadLcpCodeFiles() warms blocks/<name>/<name>.{js,css} for every first-section
div[class]:not(.content). breadcrumbs is authored there but is relocated into the
header by decorateHeader() and loaded by gnav, not from blocks/breadcrumbs/ (which
does not exist), so the preload 404s. The preload runs before decorateHeader removes
the div, unlike the real block loader. Exclude breadcrumbs, mirroring the merch/mas
exclusion.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
narcis-radu
approved these changes
Sep 16, 2026
Replace the breadcrumbs denylist with an allowlist: prewarm an authored first-section div only if its class is a known block (C1_BLOCKS/C2_BLOCKS by page foundation, plus externalLibs blocks). Denylisting non-blocks is unbounded and 404s on a miss; the allowlist is defensive - an unrecognized div (e.g. breadcrumbs, which gnav loads and decorateHeader relocates) is skipped rather than fetched from a path that doesn't exist. Commerce (merch/mas) policy exclusion retained. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
vhargrave
marked this pull request as ready for review
September 16, 2026 09:03
bandana147
approved these changes
Sep 16, 2026
JasonHowellSlavin
approved these changes
Sep 16, 2026
Contributor
|
Reminder to set the |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What's wrong
bacom pages have been firing failed (404) network requests for
breadcrumbs.jsandbreadcrumbs.csssince ~Sep 10. Nothing looks broken on the page — the breadcrumbs still render — but every page load makes two requests for files that don't exist.Why
PR #6643 added an LCP preloader that warms the code for every block in the page's first section. It assumes each element there is a normal block living at
blocks/<name>/.breadcrumbsbreaks that assumption. It isn't a standalone block — the global nav moves it into the header and loads it from there, so there is noblocks/breadcrumbs/file to fetch. The preloader didn't know that and requested it anyway → 404.It only happens because the preloader runs early — before the code that moves breadcrumbs out of the first section. The normal block loader runs later, after breadcrumbs is already gone, so it never hit this.
The fix
Rather than keep a growing list of "things to skip" (breadcrumbs today, something else tomorrow), flip the logic: only preload blocks we actually recognize.
The preloader now checks each first-section element against Milo's known-block lists (
C1_BLOCKS/C2_BLOCKS, plus any blocks a consumer registers viaexternalLibs) and skips anything not on them. breadcrumbs — and any other non-block — is quietly skipped.This is intentionally conservative: the worst case is that we occasionally don't warm a block (harmless — it just loads normally a moment later), instead of requesting a file that isn't there (a visible 404). Commerce blocks (merch/mas) are still skipped on purpose, as before.
Resolves: MWPW-207641
Test URLs:
Consumer check (da-bacom):
Steps to test
breadcrumbs. You'll see failed (404) requests forbreadcrumbs.js/breadcrumbs.css.🤖 Generated with Claude Code