feat: add truthful public page structured data - #19
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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
📝 WalkthroughWalkthroughThe contact and Promptly privacy pages now include JSON-LD metadata. A Node.js test validates the metadata and confirms npm script integration. The ChangesPublic structured data
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant npm
participant StructuredDataTest
participant PublicPages
npm->>StructuredDataTest: Run structured-data validation
StructuredDataTest->>PublicPages: Read contact and privacy HTML
PublicPages-->>StructuredDataTest: Return JSON-LD metadata
StructuredDataTest-->>npm: Report checks and exit status
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
scripts/test-public-structured-data.mjs (1)
89-95: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winValidate page-node uniqueness and identity.
find()does not reject a secondContactPageorWebPagenode. The test also does not validate the page@id. A duplicate or incorrectly identified page node can pass when the first matching node is valid.Count matching page nodes and require
@idto equal${canonical}#webpage``.Proposed test update
- const page = (graph["`@graph`"] || []).find((node) => node["`@type`"] === pageType) - ok(page !== undefined, `${label} JSON-LD declares the page as ${pageType}`) + const pages = (graph["`@graph`"] || []).filter((node) => node["`@type`"] === pageType) + ok(pages.length === 1, `${label} JSON-LD declares exactly one ${pageType}`) + const [page] = pages if (!page) continue + ok(page["`@id`"] === `${canonical}`#webpage``, `${label} JSON-LD `@id` matches the canonical URL`) ok(page.url === canonical, `${label} JSON-LD url matches the page canonical URL`)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/test-public-structured-data.mjs` around lines 89 - 95, Update the page-node validation around the graph lookup to collect all nodes matching pageType, assert exactly one match exists, and use that unique node for subsequent checks. Also assert its `@id` equals the canonical URL with the `#webpage` suffix before validating url, name, and description.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@scripts/test-public-structured-data.mjs`:
- Around line 89-95: Update the page-node validation around the graph lookup to
collect all nodes matching pageType, assert exactly one match exists, and use
that unique node for subsequent checks. Also assert its `@id` equals the canonical
URL with the `#webpage` suffix before validating url, name, and description.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 65b565a9-f5e4-459f-b377-73056ed40a0f
📒 Files selected for processing (4)
package.jsonpublic/contact/index.htmlpublic/promptly/privacy/index.htmlscripts/test-public-structured-data.mjs
Adds source-bound JSON-LD for the contact and Promptly privacy pages, with focused regression coverage and existing test wiring. Co-Authored-By: Claude <noreply@anthropic.com>
a7df7f1 to
613f691
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: 613f691b7c
ℹ️ 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".
| "about": { | ||
| "@id": "https://tinystudio.in/#organization" | ||
| }, |
There was a problem hiding this comment.
Point the privacy page at the Promptly app
For consumers that traverse this graph, about identifies Tiny Studio itself as the subject of an explicitly app-specific Promptly policy, even though the existing product schema defines the relevant entity as https://tinystudio.in/promptly/#app. Point about at that app entity and represent Tiny Studio as the publisher instead; otherwise the new metadata misclassifies the policy, and the assertion at scripts/test-public-structured-data.mjs:100-103 locks in that mismatch.
Useful? React with 👍 / 👎.
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
) * fix(public): add social preview imagery to the 7 pages missing it 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 * fix(public): add JSON-LD structured data to trust and support pages 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
… leave the June-20 bundle (#81) * fix(public): add the tinystudio.in release lane (Cloudflare Pages deploy path repair) The live site has served the 2026-06-20 bundle (07acd07) since June 20 while 17+ public PRs merged to main; the Cloudflare Pages git connection for tiny-studio-3f5 never shows checks/statuses on commits and no deploy workflow or secrets exist in the repo. The fleet Workers token lacks Cloudflare Pages:Edit, so no automation on this box can publish today. Add an in-repo release lane that works the moment a Pages-scoped token is provisioned (documented fail-closed message): - scripts/prepare-public-deploy-bundle.mjs: filtered bundle (public/ minus the snoozed-by-Nish managed-service buyer path from PRs #10/#11; every other merged fix preserved), fail-closed in both directions - scripts/test-public-deploy-bundle.mjs: regression guard, wired into npm test/ci (62 checks) - scripts/publish-public-site.mjs: prepare -> wrangler pages deploy to tiny-studio-3f5 -> live verification - scripts/check-public-live-deploy.mjs: live proof for the deploy-path accept (H2-after-H1 /promptly/support/ #18/#20, JSON-LD /contact/ #19, real 404s #34, homepage portfolio-only #29 + no buyer path) - .github/workflows/deploy-public-site.yml: vps-verify lane on push to main - wrangler 4.120.0 devDependency verify: npm test (603 checks, 0 failures); node scripts/prepare-public-deploy-bundle.mjs; git diff --check * fix(public): attach the source commit to Cloudflare Pages deployments wrangler pages deploy accepts --commit-hash/--commit-message/--commit-dirty for dashboard provenance. The bundle already records source_commit in deploy-manifest.json; pass it through so the Pages dashboard links the deployment to the exact tinystudio-in commit that produced the bundle. verify: node --check scripts/publish-public-site.mjs; node scripts/test-public-deploy-bundle.mjs (62 checks, 0 failures) Co-authored-by: CommandCodeBot <noreply@commandcode.ai> --------- Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
Summary
/contact/and/promptly/privacy/.npm test,npm run check, andnpm run ci.intended-outcome: Public machines can classify these two previously bare pages without invented facts, duplicate schema, or new public promises.
verify:
/home/nish/.local/bin/test-gate npm run check,/home/nish/.local/bin/test-gate npm test,/home/nish/.local/bin/test-gate npm run ci,git diff --check,crgate --agent; all passed, with sgscan showing only baseline warnings.Review
Summary by CodeRabbit