Skip to content

feat: add truthful public page structured data - #19

Merged
nish3451 merged 1 commit into
mainfrom
fix/public-structured-data
Aug 8, 2026
Merged

feat: add truthful public page structured data#19
nish3451 merged 1 commit into
mainfrom
fix/public-structured-data

Conversation

@nish3451

@nish3451 nish3451 commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add source-bound JSON-LD to /contact/ and /promptly/privacy/.
  • Use the existing Tiny Studio organization identity and page metadata only.
  • Add 31-check regression coverage and wire it into npm test, npm run check, and npm 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

  • Grok: ship; best version; required repair: none.
  • No live/deploy proof is claimed; this PR is repository-only.

Summary by CodeRabbit

  • New Features
    • Added structured metadata to the Contact and Promptly Privacy pages, improving how search engines and other services understand page titles, descriptions, relationships, and canonical URLs.
  • Bug Fixes
    • Improved validation of public page metadata to help ensure structured information remains accurate and consistent.
  • Tests
    • Added automated checks for structured data and integrated them into standard validation workflows.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nish3451 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 82a7fc20-ad03-4763-91d0-20e6fb087663

📥 Commits

Reviewing files that changed from the base of the PR and between a7df7f1 and 613f691.

📒 Files selected for processing (3)
  • package.json
  • public/contact/index.html
  • public/promptly/privacy/index.html
🚧 Files skipped from review as they are similar to previous changes (3)
  • public/promptly/privacy/index.html
  • package.json
  • public/contact/index.html

📝 Walkthrough

Walkthrough

The contact and Promptly privacy pages now include JSON-LD metadata. A Node.js test validates the metadata and confirms npm script integration. The ci and test scripts run this validation.

Changes

Public structured data

Layer / File(s) Summary
Page metadata
public/contact/index.html, public/promptly/privacy/index.html
The pages define Organization and page metadata with canonical URLs, titles, descriptions, and page relationships.
Structured-data validation
scripts/test-public-structured-data.mjs
The new test extracts JSON-LD, validates each page’s schema graph and metadata, reports results, and exits with failure status when checks fail.
npm script integration
package.json, scripts/test-public-structured-data.mjs
The ci and test scripts run the structured-data test. The test verifies the test, ci, and check command relationships.

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
Loading

Possibly related PRs

  • nish3451/tinystudio-in#18: Both PRs update the ci and test scripts and overlapping public pages to add automated validation for different page-quality requirements.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding truthful structured data to public pages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/public-structured-data

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
scripts/test-public-structured-data.mjs (1)

89-95: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Validate page-node uniqueness and identity.

find() does not reject a second ContactPage or WebPage node. 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 @id to 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

📥 Commits

Reviewing files that changed from the base of the PR and between a662a53 and a7df7f1.

📒 Files selected for processing (4)
  • package.json
  • public/contact/index.html
  • public/promptly/privacy/index.html
  • scripts/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>
@nish3451
nish3451 force-pushed the fix/public-structured-data branch from a7df7f1 to 613f691 Compare August 8, 2026 19:07

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nish3451 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@nish3451
nish3451 merged commit a7de536 into main Aug 8, 2026
3 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +40 to +42
"about": {
"@id": "https://tinystudio.in/#organization"
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

nish3451 added a commit that referenced this pull request Aug 9, 2026
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
nish3451 added a commit that referenced this pull request Aug 9, 2026
)

* 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
nish3451 added a commit that referenced this pull request Aug 11, 2026
… 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant