Repository navigation
Add an SEO prompt composer to the OG viewer - #1922
Merged
David Pine (IEvangelist) merged 1 commit intoOct 26, 2026
Merged
David Pine (IEvangelist) merged 1 commit into
David Pine (IEvangelist) merged 1 commit into
Conversation
Adds a Prompt tab and a get_prompt canvas action that turn a URL into a ready-to-paste AI prompt: a bounded JSON snapshot of its SEO and social metadata (URL and redirects, HTTP headers, title, description, canonical, robots, hreflang, structured data, Open Graph, Twitter, diagnostics, agent readiness) wrapped in composable task modules and the user's own notes. The payload and prompt are built by one pure module (lib/build-prompt.mjs) that the extension server and the canvas UI share, so the tab and the action cannot drift. The parser gains the extra SEO fields with caps, and the fifth tab gets a responsive toolbar fix. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ed12c02d-40f7-44b1-b708-2f2517aa89e7
David Pine (IEvangelist)
merged commit Oct 26, 2026
5311e3a
into
ievangelist-og-viewer-oversized-page-fix
2 checks passed
David Pine (IEvangelist)
deleted the
ievangelist-og-preview-prompt-composer
branch
October 26, 2026 19:01
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.
Summary
Adds a Prompt tab to the OG Viewer canvas and an agent-callable
get_promptaction. Both turn a URL into one ready-to-use prompt for an AI assistant: a short context block, composable task modules (audit, fix head tags, rewrite copy, share image, structured data, agent readiness, implement, verify), the user's own notes, and a versioned JSON snapshot of the page's SEO and social metadata (URL and redirects, HTTP headers, title, description, canonical, robots, hreflang, JSON-LD, Open Graph, Twitter, diagnostics, agent readiness).Stacked on #1918. This branch is based on #1918's branch, so the diff shows only the composer commit. I'll retarget it to
mainand rebase once #1918 merges.How it works:
lib/build-prompt.mjs, builds the payload and the prompt. The extension server and the canvas UI both use it, so the tab and the action can't drift.Page:line carries only the requested URL, and redirect targets, the canonical URL, and the detected repository appear only inside the JSON.truncated; JSON-LD that is left out is flaggeddataOmitted. The limits are listed in the README.Known limit: a page that pushes every limit at once can still produce a prompt larger than the 512 KB request limit used by Open in Copilot and Create issue, and GitHub caps an issue body at 65,536 characters. Copying always works.
Third-party links and affiliations
None. The tests use reserved
.examplehostnames as hostile fixtures; no real third-party links are added.Validation
node --checkonextension.mjs,lib/parse-og.mjs, andlib/build-prompt.mjs: all pass.node --test ".github/extensions/og-preview/tests/*.test.mjs": 72 pass, 0 fail.libfiles from before the review fixes, 11 of the new and updated tests fail, so the tests catch the problems they target.get_promptreturns the same shape; thePage:line shows only the requested URL and the detected repository appears only in the JSON.styles.css(side-tab,bounce-easing,layout-transition) that were there before this change.OG preview testsruns on this PR.ci.ymlonly runs for PRs intomainorrelease/*, so it will run after the retarget.