feat(seo-review): score table, trend arrows, unlimited scan with batching#1349
Merged
Merged
Conversation
…hing
Score & trends:
- Deterministic score table (0-100 grade + 8 issue tallies) prepended to output
- Trend arrows (▲/▼/▬) vs previous weekly issue, persisted via hidden JSON
comment <!-- seo-scores: {...} --> embedded in the issue body
- Workflow fetches previous seo-audit issue body and passes as
PREVIOUS_AUDIT_BODY env for diffing
Scan coverage:
- Remove MAX_PAGES cap (default = unlimited; positive int still acts as
escape hatch via env)
- Workflow drops MAX_PAGES: '25' env
Claude integration:
- Chunk pages by char budget; >1 batch triggers per-batch "notes-only"
prompt + a synthesis call that merges results into a unified review
- Fallback to deterministic concat if combined notes approach the cap
- Prompts now require a 💡 Fix suggestion for every issue (Critical /
Improvements / Per-page notes)
- max_tokens raised 2048 → 8192 (review was being truncated)
- Per-call and grand-total token usage logged to stdout
Refactor (perf + cleanup):
- Cheerio load() once per page, share $ between extractMeta and
extractLinksAndRefresh (was parsing twice in full mode)
- Parallel file reads via Promise.all (was sequential await loop)
- Cache repeated selector queries in extractMeta
- Drop dead siteHost plumbing
- Rename local `path` shadowing node:path in findRedirectChains
felixwidjaja
approved these changes
May 28, 2026
Contributor
🔎 SEO & Meta ReviewSkipped (mode: No |
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
Overhauls the
seo-reviewworkflow with a deterministic score, week-over-week trends, unlimited page coverage, and Claude batching for large sites.Score & trends
<!-- seo-scores: {...} -->comment inside the issue body — no extra storage requiredseo-auditissue and passes its body asPREVIOUS_AUDIT_BODYenvScan coverage
MAX_PAGEScap — weekly audit now covers all 92 (and beyond) built pages. The env remains as an opt-in escape hatch when set to a positive int.MAX_PAGES: '25'envClaude integration
max_tokensraised 2048 → 8192 (output was being silently truncated)Refactor (perf + cleanup)
Cheerio.load()once per page;$shared betweenextractMetaandextractLinksAndRefresh(was parsing twice in full mode)Promise.all(was sequentialawaitloop)extractMetasiteHostplumbingpathshadowingnode:pathinfindRedirectChainsVerification
Smoke-tested three paths against the live
dist/client(92 pages):Score for current
main: 🟡 89/100 — surfaces real issues including a systemic 2-H1 bug across~55 /handbook/**pages, a typo in/changelog/og:title ("shippped"), and relativeog:imageURLs across 8/brand/*pages.Issue: #1348
Test plan
workflow_dispatch(mode:full) and verify the issue body contains:<!-- seo-scores: {...} -->comment### 📊 Score summarytable with grade + 12 metric rows💡 Fix:lines per issueToken usage — N call(s): ...)src/pages/**file and verify changed-only mode still posts a sticky PR comment with the score table