Repository navigation
fix: Use PNG icon from server.json instead of hardcoded favicon URL - #1938
Conversation
`getServerCard()` set the SEP-1649 `iconUrl` field to https://apify.com/favicon.ico, a low-resolution ICO. It now uses the PNG entry of `icons` in `server.json` (512x512), so the card has one icon source and `iconUrl` cannot drift from `icons`. SEP-1649 puts no format rule on `iconUrl`. PNG is chosen over the SVG because the registry `icons` field requires icon-rendering clients to support PNG and JPEG, not SVG. `APIFY_FAVICON_URL` had no other users and is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015KycPoRts1z2T24pspdzjz
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the server card’s switch to the configured PNG icon.
No open issues 🎉
What changed in this PR
Updates the MCP server card to use the 512×512 PNG icon from server.json instead of the hardcoded favicon URL, without changing the card’s contract.
Changes:
- Selects the PNG icon from the existing server metadata.
- Removes the unused favicon URL constant.
- Adds a unit test asserting that the card uses the configured PNG icon.
| File | Description |
|---|---|
tests/unit/server_card.test.ts |
Adds coverage for the PNG icon URL selection. |
src/server_card.ts |
Sources iconUrl from the PNG entry in server.json. |
src/const.ts |
Removes the unused APIFY_FAVICON_URL constant. |
Review effort: Balanced
|
The new test Nit: the code comment cites SEP-1649 for the PNG reason, but the PR body cites SEP-2127. The "every client supports PNG" rule comes from 2127. |
jirispilka
left a comment
There was a problem hiding this comment.
I would fix the test, otherwise LGTM
The test repeated the same `icons.find()` lookup as `getServerCard()`, so it only checked the code against itself. A `server.json` without a PNG icon is already caught by `includes a PNG icon, which every icon-rendering client must support`. The code comment now cites SEP-2127, where the rule that clients must support PNG comes from. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015KycPoRts1z2T24pspdzjz
|
@jirispilka Both done in 01cd439: dropped the test, and the code comment now cites SEP-2127 for the PNG rule. Updated the Proof line in the PR body to match. Generated by Claude Code |
The server card's
iconUrlnow points at the 512×512 PNG fromserver.jsoninstead of the low-reshttps://apify.com/favicon.ico. PNG rather than SVG because clients that render icons must support PNG, not SVG (SEP-2127). No issue: requested ad hoc by a maintainer. Written with Claude Code.Breaking / unchanged
No contract change.
apify-mcp-server-internalneeds to bump@apify/actors-mcp-serverfrom0.21.12to ship this and the"Apify"title from #1925.Proof: unit tests pass. The existing test
includes a PNG icon, which every icon-rendering client must supportfails ifserver.jsonloses the PNG entry thaticonUrlreads.🤖 Generated with Claude Code
https://claude.ai/code/session_015KycPoRts1z2T24pspdzjz