fix(public): add JSON-LD structured data to trust and support pages - #26
Conversation
There was a problem hiding this comment.
nish3451 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
Warning Review limit reached
Next review available in: 3 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThe pull request adds Schema.org JSON-LD metadata to six public pages. It also updates the structured-data test to cover explicit pages and recursively validate every public ChangesStructured data coverage
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5a82e335a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| readdirSync(join(ROOT, dir), { withFileTypes: true }).flatMap((entry) => { | ||
| const path = join(dir, entry.name) | ||
| if (entry.isDirectory()) return publicHtmlFiles(path) | ||
| if (entry.isFile() && entry.name === "index.html") return [path] |
There was a problem hiding this comment.
Scan every HTML file, not just index pages
When a standalone public page such as public/404.html is added, this filter silently excludes it, so the new “every public HTML page” invariant passes even if that page has no JSON-LD. Match all .html files rather than only files named index.html so CI enforces the stated invariant for every deployed HTML document.
Useful? React with 👍 / 👎.
Seven of the 12 public pages (privacy, privacy-choices, terms, the Promptly and Drishti support/privacy pairs) declared no og:image or twitter:image, so shared links rendered as bare text cards. This class gap was left behind after the closed /promptly heading work touched the same page families. Add the full og:image block (secure_url, type, 1200x630 dimensions, alt) and the matching twitter summary_large_image card to all 7 pages, reusing the per-family social art that already exists: tiny-studio-social.png for studio pages, promptly-social.png for /promptly/*, and drishti-social.png for /drishti/*. The 5 pages that already had imagery are unchanged. Adds scripts/test-public-social-preview.mjs, wired into npm test and npm run ci, asserting every one of the 12 public pages declares the complete og:image and twitter:image blocks, that twitter:image matches og:image, and that every referenced image ships in public/social/. verify: /home/nish/.local/bin/test-gate npm test; git diff --check; node --check scripts/test-public-social-preview.mjs
The structured data pass in #19 covered only the contact page and the Promptly privacy page, leaving the other six public pages - studio privacy, terms, privacy choices, Drishti privacy, Drishti support, and Promptly support - without any JSON-LD. Every public page should expose source-bound structured data so search engines get consistent page metadata across the site. Add the same truthful @graph blocks used elsewhere: a stable Tiny Studio Organization reference plus the page node. Privacy, terms, and privacy choices pages are declared as WebPage (matching the Promptly privacy pattern); the two app support pages are declared as ContactPage with an isPartOf/about relationship to the site and organization, mirroring the existing /support/ and /contact/ pages. All JSON-LD values (url, name, description) are copied from each page's canonical, title, and meta description so the data stays truthful to the page. Extends scripts/test-public-structured-data.mjs to cover all eight audited pages and adds an invariant that every public HTML page carries exactly one application/ld+json block, so a future page can never ship without structured data again. verify: /home/nish/.local/bin/test-gate npm test; /home/nish/.local/bin/test-gate npm run ci; git diff --check; node --check scripts/test-public-structured-data.mjs; node scripts/test-public-structured-data.mjs shows 127 checks, 0 failures across all 12 public pages
f5a82e3 to
c52d514
Compare
There was a problem hiding this comment.
nish3451 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c52d5142be
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| // Every public page (canonical list, mirrors test-public-footer-targets.mjs). | ||
| const PUBLIC_PAGES = [ |
There was a problem hiding this comment.
Discover public HTML pages instead of hard-coding them
When a new deployed page such as public/404.html is added, this fixed list omits it, so npm test remains green even if the page has no Open Graph or Twitter image metadata. Recursively discover every .html file under public/ so the stated every-page social-preview invariant automatically covers future standalone and nested pages.
Useful? React with 👍 / 👎.
…ive blocked on missing Cloudflare token Lane 1 verification report: the 7-page social preview imagery fix is already merged to main (PR #26, ffe6e1f) and test-public-social-preview.mjs guards the static files. The live tinystudio.in still serves the stale bundle with exactly the 7 pages from the item missing og:image, and live delivery is blocked only by the missing CLOUDFLARE_API_TOKEN secret (NEEDS-NISH, deploy-pipeline item). Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
… already complete in PR #26, live blocked on missing Cloudflare token (#182) Dogfood finding 82771ab0cb63 flags /promptly/privacy's social share image as incomplete. Verified on lane resume: the full og:image block and twitter:image are already merged on main via PR #26 (commit ffe6e1f) and test-pinned (137 checks, 0 failures); live tinystudio.in/promptly/privacy/ still serves zero og:image tags because every deploy run fails at the fail-closed missing CLOUDFLARE_API_TOKEN step. NEEDS-NISH: provision the secret. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
What
Six trust/support pages carried no JSON-LD structured data while the other six public pages did. This PR closes the gap so every public page on tinystudio.in exposes source-bound structured data.
Changed pages
/privacy/WebPage/terms/WebPage/privacy-choices/WebPage/drishti/privacy/WebPage/drishti/support/ContactPage/promptly/support/ContactPageEach page gains the same truthful
@graphblock used elsewhere: a stable Tiny StudioOrganizationreference plus the page node (isPartOfthe website,aboutthe organization). Every JSON-LD value (url,name,description) is copied verbatim from the page's canonical,<title>, and meta description, matching the pattern established in #19. Support pages useContactPageto mirror the existing/support/and/contact/pages.Tests
scripts/test-public-structured-data.mjsnow covers all eight audited pages and adds an invariant that every public HTML page carries exactly oneapplication/ld+jsonblock (all 12 pages), so a future page cannot ship without structured data again.Verification
test-gate npm test— exit 0test-gate npm run ci— exit 0git diff --check— cleannode --check scripts/test-public-structured-data.mjs— cleannode scripts/test-public-structured-data.mjs— 127 checks, 0 failuresSummary by CodeRabbit
New Features
Tests