Skip to content

Source integration favicons from integrations.sh/logo#1250

Merged
RhysSullivan merged 2 commits into
mainfrom
integrations-logo-favicons
Jul 2, 2026
Merged

Source integration favicons from integrations.sh/logo#1250
RhysSullivan merged 2 commits into
mainfrom
integrations-logo-favicons

Conversation

@RhysSullivan

Copy link
Copy Markdown
Collaborator

integrations.sh now exposes GET /logo/{domain}?sz=N, an edge-cached proxy over a proper logo API, so favicons come from there instead of hitting Google's favicon service directly.

  • integrationFaviconUrl now builds https://integrations.sh/logo/{domain}?sz=N.
  • The resolution cascade gains a final step, integrationFaviconFallbackUrl (the old Google s2/favicons URL), so if the proxy is unreachable the <img> onError handler walks to it automatically; the BoxIcon placeholder remains the terminal fallback.
  • Domain extraction and local-URL guards are unchanged (still tldts registrable-domain based).

Tests updated and passing (14), full bun run typecheck green.

integrations.sh now proxies context.dev's Logo Link behind an edge cache,
so it becomes the single logo source; the Google favicon service stays in
the resolution cascade as the onError fallback.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 2, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing ed09aac Commit Preview URL

Branch Preview URL
Jul 02 2026, 02:50 AM

@greptile-apps

greptile-apps Bot commented Jul 2, 2026

Copy link
Copy Markdown

Greptile Summary

This PR replaces per-site favicon.ico URLs and Google's s2/favicons service with integrations.sh/logo/{domain} as the primary logo source across all preset files, and restructures integration-favicon.tsx to add a proper two-step cascade: the new proxy first, Google's favicon service as an automatic fallback via the onError handler.

  • integrationFaviconDomain is extracted as a shared helper; integrationFaviconUrl now targets the proxy and integrationFaviconFallbackUrl (new export) wraps the old Google URL, added as the fourth step in integrationFaviconSrc.
  • All preset icon fields in graphql, mcp, microsoft, and openapi plugins are migrated from direct-to-origin .ico paths to https://integrations.sh/logo/{domain}.
  • Tests are updated to cover the new primary URL, the Google fallback, and the two-step cascade walk.

Confidence Score: 5/5

Safe to merge; the cascade ensures Google's favicon service is always the final fallback, so no integration will silently lose its icon.

The change is a straightforward URL substitution across preset files and a well-tested cascade extension. The existing onError fallback chain guarantees a working icon even if the new proxy is unreachable. The one observation (preset-icon path retries the proxy twice before Google) is a minor inefficiency that only surfaces when the proxy is down, and does not affect correctness.

No files require special attention; the preset files are mechanical substitutions and the cascade logic in integration-favicon.tsx is clean.

Important Files Changed

Filename Overview
packages/react/src/components/integration-favicon.tsx Extracts integrationFaviconDomain helper, changes primary URL to integrations.sh proxy, adds integrationFaviconFallbackUrl (Google), and adds it as a 4th cascade step. When preset icons also point to integrations.sh, two separate proxy requests fire before Google fallback.
packages/react/src/components/integration-favicon.test.tsx Tests updated to cover new proxy URL, Google fallback, and the two-step cascade walk. Missing 127.0.0.1 guard test for integrationFaviconFallbackUrl (flagged in a prior thread).
packages/plugins/openapi/src/sdk/presets.ts Migrates all hardcoded favicon.ico URLs to integrations.sh/logo/{domain} without ?sz parameter. Straightforward mechanical substitution across 12 entries.
packages/plugins/mcp/src/sdk/presets.ts Migrates all MCP preset favicon URLs to integrations.sh/logo/{domain}. Straightforward mechanical substitution.
packages/plugins/graphql/src/sdk/presets.ts Migrates GraphQL preset favicon URLs to integrations.sh/logo/{domain}. Straightforward mechanical substitution.
packages/plugins/microsoft/src/sdk/presets.ts Updates MICROSOFT_ICON constant to integrations.sh/logo/microsoft.com. Single-line change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[IntegrationFavicon renders] --> B{args.icon set?}
    B -- Yes --> C[Try preset icon\nhttps://integrations.sh/logo/domain]
    B -- No --> E
    C -- success --> Z[Display icon]
    C -- onError --> D{args.sourceId = executor?}
    D -- Yes --> F[Try /favicon-32.png]
    D -- No --> E
    F -- success --> Z
    F -- onError --> E
    E[integrationFaviconUrl\nhttps://integrations.sh/logo/domain?sz=N] -- success --> Z
    E -- onError --> G[integrationFaviconFallbackUrl\nhttps://www.google.com/s2/favicons?domain=X&sz=N]
    G -- success --> Z
    G -- onError --> H[BoxIcon placeholder]
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[IntegrationFavicon renders] --> B{args.icon set?}
    B -- Yes --> C[Try preset icon\nhttps://integrations.sh/logo/domain]
    B -- No --> E
    C -- success --> Z[Display icon]
    C -- onError --> D{args.sourceId = executor?}
    D -- Yes --> F[Try /favicon-32.png]
    D -- No --> E
    F -- success --> Z
    F -- onError --> E
    E[integrationFaviconUrl\nhttps://integrations.sh/logo/domain?sz=N] -- success --> Z
    E -- onError --> G[integrationFaviconFallbackUrl\nhttps://www.google.com/s2/favicons?domain=X&sz=N]
    G -- success --> Z
    G -- onError --> H[BoxIcon placeholder]
Loading

Reviews (2): Last reviewed commit: "Route preset vendor favicons through int..." | Re-trigger Greptile

it("does not request favicons for local URLs", () => {
expect(integrationFaviconUrl("http://localhost:3000/private", 20)).toBeNull();
expect(integrationFaviconUrl("http://127.0.0.1:3000/private", 20)).toBeNull();
expect(integrationFaviconFallbackUrl("http://localhost:3000/private", 20)).toBeNull();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 The 127.0.0.1 local-URL guard is tested for integrationFaviconUrl but the new integrationFaviconFallbackUrl is only checked against localhost. Since both functions share the same integrationFaviconDomain helper the guard holds for IPs too, but the symmetry gap makes it easy for a future refactor to silently break IP blocking on the fallback path without a failing test.

Suggested change
expect(integrationFaviconFallbackUrl("http://localhost:3000/private", 20)).toBeNull();
expect(integrationFaviconFallbackUrl("http://localhost:3000/private", 20)).toBeNull();
expect(integrationFaviconFallbackUrl("http://127.0.0.1:3000/private", 20)).toBeNull();

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 2, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud ed09aac Jul 02 2026, 02:53 AM

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

@pkg-pr-new

pkg-pr-new Bot commented Jul 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@1250

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@1250

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@1250

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@1250

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@1250

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@1250

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@1250

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@1250

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@1250

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@1250

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@1250

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@1250

executor

npm i https://pkg.pr.new/executor@1250

commit: ed09aac

Preset icons that pointed at vendor favicon.ico paths (brittle: vendors move
or serve HTML) now use the same /logo proxy the derived favicon path uses.
Deliberate keeps: svgl.app and fonts.gstatic.com product logos (per-product
marks for Google/Microsoft sub-products the domain-keyed proxy can't
distinguish), bundled marketing assets, and the app's own favicon links.
@RhysSullivan

Copy link
Copy Markdown
Collaborator Author

Extended the sweep: preset icons that pointed at vendor favicon.ico paths (stripe.com, linear.app, notion.com, ... 28 URLs across the openapi/graphql/mcp/microsoft plugins) now route through integrations.sh/logo too. Kept as-is: svgl.app and fonts.gstatic product logos (per-product marks for Google/Microsoft sub-products that a domain-keyed proxy can't distinguish), bundled marketing assets, and the app's own favicon links. Verified every swapped domain serves a real image via the proxy; plugin sdk tests and typecheck pass.

@RhysSullivan
RhysSullivan merged commit 5225f85 into main Jul 2, 2026
16 of 17 checks passed
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.

1 participant