fix: load oversight URL thumbnails only after successful probe#403
fix: load oversight URL thumbnails only after successful probe#403davidnuescheler wants to merge 1 commit into
Conversation
Avoid broken og:image placeholders by probing _ogimage before inserting img tags, skip thumbnails when the 404 checkpoint is filtered, and keep favicon fallback for facets that opt in. Co-authored-by: Cursor <[email protected]>
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
|
| if (labelText.startsWith('https://') || labelText.startsWith('http://')) { | ||
| return `<a href="${escapeHTML(labelText)}" target="_new">${escapeHTML(labelText)}</a>`; | ||
| return `<a href="${escapeHTML(labelText)}" target="_new">${labelURLParts(labelText, prefix, solo)}</a>`; | ||
| } |
There was a problem hiding this comment.
BLOCKING (likely unintended scope creep): This fallback branch handles every link-facet that renders an http(s):// value without thumbnail="true" (e.g. click.target, error.source, redirect.source, and any thumbnail="false" facet such as enter.source on list.html/table.html/share.html/single.html, or url/redirect.source on redirectperf.html/cwvperf.html). Previously it rendered the plain escaped URL as anchor text; this change switches it to labelURLParts(...), which decomposes the URL into <span class="protocol">/<span class="hostname">/<span class="pathname">/etc.
That's a behavior change unrelated to the PR's stated scope (async thumbnail probing / 404-checkpoint skip / favicon fallback), and it isn't covered by the new tests (which only exercise the extracted helper functions, not createLabelHTML). It also interacts with existing CSS such as #facets link-facet[facet="enter.source"] a .hostname { display: inline } / .pathname { display: none } in rum-slicer.css, which previously only applied when thumbnail="true" — after this change it will also silently truncate enter.source URLs to hostname-only wherever thumbnail="false" is set.
If this was unintentional, please revert to the original plain-text rendering:
| } | |
| return `<a href="${escapeHTML(labelText)}" target="_new">${escapeHTML(labelText)}</a>`; |
If it's intentional, please call it out in the PR description and add a test/manual check for the affected non-thumbnail facets (enter.source on list/table/share/single, click.target, error.source, redirect.source).
Code ReviewReviewed the async thumbnail-probe rewrite in What's good
Issues FoundBLOCKING:
VerdictREQUEST CHANGES — pending confirmation on the scope-creep item above. |
Summary
Image()probe so failed_ogimageresponses never render broken<img>placeholders404checkpoint filter is active, since those pages are expected to have no og:imagefavicon="true"(e.g. Enter Source)Test plan
_ogimagesucceeds — no broken icons or "thumb" alt textnpm test -- tests/tools/optel/oversight/link-facet.test.jsnpm run lint:jsMade with Cursor