feat(seo_report): render full digest centrally (Search + Product + budget)#7
Merged
Merged
Conversation
…dget) The seo_report renderer only emitted a one-line "search digest" (clicks · impressions · CTR). Consumers that want the richer daily digest (product metrics + agent budget) had to hand-build subSections + footerNote, so the format drifted per site. Make Loop render it centrally and identically: add structured `product` (signups24h / paidConversions7d / totalUsers / paidUsers / mrrUsd) and `budget` (spentUsd / capUsd) to the seo_report payload (client type + schema), and have the renderer lay out the standard sections: 📈 SEO digest · <site> Search · last 7 days (impressions / clicks / CTR + top queries) Product · last 24h / 7d (the metrics that were sent) footer: Anthropic budget: $X of $Y this month · <site> Emoji 📈 (was 🔎), title "SEO digest · <site>" (was "<site> · search digest"). Budget footer derives from the structured `budget` unless an explicit footerNote is provided. All fields optional → back-compatible. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Why
The
seo_reportrenderer emitted only a one-line "search digest" (clicks · impressions · CTR). Consumers wanting the richer daily digest (product metrics + agent budget) had to hand-buildsubSections+footerNote, so the format drifted per site. This makes Loop render the full digest centrally and identically for every site.Changes
seo_reportpayload gains structured, optionalproduct(signups24h/paidConversions7d/totalUsers/paidUsers/mrrUsd) andbudget(spentUsd/capUsd) — client type + server zod schema.📈(was🔎), headerSEO digest · <site>(was<site> · search digest). Budget footer derives from structuredbudgetunless an explicitfooterNoteis given.seo_reportsenders.Verification
pnpm test✅ 144 passing (updated the seo_report baseline snapshot for the new format)tsc --noEmit✅ service + client🤖 Generated with Claude Code