Repository navigation
Web dashboard: a shared link previews with the sun icon - #65
Merged
Merged
Conversation
Chat apps build a link preview from the page's Open Graph tags, and the page's icon is a data: URI, which can't be an og:image. The sun is now a file beside the page (/dashboard/icon.png, 512 px, no token, any Host), and the page carries og:title, og:description, og:image (with its type, size and alt) and a Twitter "summary" card first in its head. og:image is relative to the path the page was asked for (/dashboard: "dashboard/icon.png"; /dashboard/: "icon.png"), so it is right behind a proxy that maps a site's root to /dashboard/. New MCP_DASHBOARD_URL, the page's public URL, makes it absolute and adds og:url, which WhatsApp, Messenger, Telegram, Slack and Discord need: nginx's defaults leave nothing in the request to build it from. README and docs/configuration.md say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
…view's; no MCP_DASHBOARD_URL The favicon and apple-touch-icon were data: URIs, which no link preview can fetch. They now link icon.png beside the page, relative to the path it was asked for, as og:image does, so apps that take a page's icon for its preview (Signal, iMessage) show the sun with nothing to set, behind any proxy. MCP_DASHBOARD_URL goes: apps that want og:image absolute and don't take the icon (WhatsApp, Messenger) show the title and line alone. The page is 19 KB instead of about 120. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
…ll https address with nothing to set WhatsApp and Messenger want og:image as a full https address and take no page icon; ecobot-mcp can't know its own public address behind a proxy. og:image is now the icon as this repository publishes it (raw.githubusercontent.com, main, image/png); only a preview fetches it. The page's favicon and apple-touch-icon stay the file beside it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WBwHofjb1g9onaYRdLZMbf
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.
Chat apps showed a blank preview for a shared dashboard link: the page had no Open Graph tags, and its icon was a
data:URI, which no link preview can fetch.og:title"Weather Dashboard",og:description,og:image(512×512 PNG, with type, size and alt), andtwitter:card"summary".og:imageis the icon as this repository publishes it,https://raw.githubusercontent.com/robdevops/ecobot/main/lib/web_dashboard_icon.png. That is a full https address with nothing to set, which WhatsApp, Messenger, Discord and the others need, and ecobot-mcp can't know its own public address behind a proxy. Only link previews fetch it; the browser loads nothing from elsewhere. That address only works once this is onmain, so Signal and Discord show no picture until then./dashboard/icon.png, linked relative to the page's path, so they're right behind any proxy. Without the inline icons the page is 19 KB instead of about 120 KB.MCP_DASHBOARD_URLwas added and removed again within this branch).Checks:
python -m pytest -q -m ""1,869 passed;python scripts/eval_prompts.py101 of 101.Generated by Claude Code