Skip to content

fix: promote a servable logo when pages have no header wordmark - #1

Open
replynodes-ai wants to merge 1 commit into
mainfrom
cursor/servable-logo-url-ce87
Open

replynodes-ai wants to merge 1 commit into
mainfrom
cursor/servable-logo-url-ce87

Conversation

@replynodes-ai

Copy link
Copy Markdown
Member

Why

extract_brand set logo_url only from a header or nav <img> whose class, id, or alt contains "logo". Homepages that publish the mark as an apple-touch icon or a sized favicon (Stripe, Notion, Linear, GitHub, Figma, Vercel, and others) came back with logo_url: null. A challenge page or empty shell (what OpenAI, Apple, Amazon, NVIDIA, and Atlassian returned to the fetcher on 16 Nov 2026) had no icon URL at all, so both the JSON route and img.replynodes.com fell through to a placeholder.

What changed

crates/webclaw-core/src/brand.rs now chooses logo_url in this order:

  1. An explicit header/nav wordmark, including SVG (unchanged).
  2. A raster JSON-LD Organization logo.
  3. The best raster icon link (apple-touch icon, then sized PNG/ICO; SVG and mask icons do not win).
  4. https://www.google.com/s2/favicons?domain={host}&sz=128 when the page has a host and nothing above exists.

favicon_url prefers a raster icon over the first <link rel="icon"> when that first icon is SVG. A page with no base URL still leaves logo_url empty.

Sample (16 Nov 2026, keyless, 22 domains)

Before, on production, which still runs the pinned webclaw binary:

  • GET /v1/brand/logo logo_url set: 5/22 (slack.com, microsoft.com, dropbox.com, discord.com, shopify.com)
  • img.replynodes.com non-placeholder: 15/22

After, on fixtures of that same markup in cargo test -p webclaw-core --lib (331 passed): every icon-only and empty fixture gets a logo_url (22/22). This is not a production deploy.

Other repo

replynodes/replynodes-fetcher owns api.replynodes.com/v1/brand/logo and img.replynodes.com. It runs this crate as a pinned, unmodified binary (services/webcontext-fetcher/provider-runtime). Shipping this commit does not change production until that pin moves. The gateway PR mirrors this selection so the live routes can improve before the pin bump.

This repository (replynodes/replynodes-brand-logo-fetch) is the retired skill and does not serve either route.

Open in Web Open in Cursor 

find_logo only accepted a header or nav image whose class, id, or alt
contained "logo", so apple-touch icons, sized favicons, and empty
challenge pages came back with logo_url unset. Prefer an explicit
wordmark, then a raster Organization logo, then the best raster icon,
then a public favicon for the page host.

Co-authored-by: replynodes <dnanh2011@gmail.com>
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.

2 participants