Skip to content

fix(web): add distribution to the state-of-claude-tooling and state-of-mcp-servers Dataset JSON-LD - #5550

Merged
JSONbored merged 1 commit into
JSONbored:mainfrom
tryeverything24:fix/state-of-dataset-distribution-5455
Jul 26, 2026
Merged

fix(web): add distribution to the state-of-claude-tooling and state-of-mcp-servers Dataset JSON-LD#5550
JSONbored merged 1 commit into
JSONbored:mainfrom
tryeverything24:fix/state-of-dataset-distribution-5455

Conversation

@tryeverything24

Copy link
Copy Markdown
Contributor

Summary

  • /state-of-claude-tooling and /state-of-mcp-servers both have real, working JSON/CSV exports (REPORT_BUILDERS["claude-tooling"] / ["mcp-servers"], both render <ReportDownloads>), but their hand-rolled "@type": "Dataset" JSON-LD blocks never got the distribution field — so structured-data consumers can't discover those exports, while the three sibling report pages that call buildReportDataset() advertise theirs for free.
  • Each page's Dataset block now carries a distribution array of two DataDownload objects (application/json + text/csv) whose contentUrl comes from the existing reportExportUrl() helper with the page's export slug — exactly the shape buildReportDataset() (apps/web/src/lib/data-reports-lib.ts) already produces for the siblings.
  • The issue's preferred alternative (switching wholesale to buildReportDataset()) was deliberately not taken: both pages' hand-rolled blocks carry richer page-specific variableMeasured lists (e.g. "Local vs hosted split", "Safety and privacy notes coverage") that the model-derived helper output would flatten. Adding the equivalent distribution field — the issue's explicitly sanctioned second option — closes the gap without losing that metadata.

Closes #5455

Quality Evidence

  • Rendered JSON-LD diff (per the issue's evidence requirement) — diff of the two pages' rendered <script type="application/ld+json"> Dataset blocks, served from the built worker (wrangler dev) before vs after:

    --- /state-of-claude-tooling Dataset JSON-LD (before)
    +++ /state-of-claude-tooling Dataset JSON-LD (after)
       "variableMeasured": [ ... unchanged ... ],
    +  "distribution": [
    +    {
    +      "@type": "DataDownload",
    +      "encodingFormat": "application/json",
    +      "contentUrl": "https://heyclau.de/api/reports/claude-tooling.json"
    +    },
    +    {
    +      "@type": "DataDownload",
    +      "encodingFormat": "text/csv",
    +      "contentUrl": "https://heyclau.de/api/reports/claude-tooling.csv"
    +    }
    +  ]

    and identically for /state-of-mcp-servers with mcp-servers.json / mcp-servers.csv. Both contentUrls point at the pages' existing, working /api/reports/* exports (same URLs <ReportDownloads> already links).

  • No change to visible content (acceptance criterion): JSON-LD renders zero pixels; the matrices below are visually identical by design. No copy, layout, or component change.

  • Regression test proven RED: the new tests/state-report-dataset-distribution.test.ts pins both pages' Dataset blocks at the source level (same pattern as tests/browse-density-radiogroup.test.ts): the block must contain a distribution array with both DataDownload encodings and the page's reportExportUrl("<slug>", ...) calls. On pre-fix code the 2 distribution assertions fail (2 locator tests pass); all 4 pass after the fix.

  • Out of scope honored: the three buildReportDataset() pages and /mcp-security-report untouched; no report content/copy changed.

Screenshot evidence

Full viewport × theme matrices for both touched pages. The change is JSON-LD-only (renders no pixels), so before/after pairs are visually identical by design.

/state-of-claude-tooling:

Viewport · Theme Before After
Desktop · Light before tooling desktop light after tooling desktop light
Desktop · Dark before tooling desktop dark after tooling desktop dark
Tablet · Light before tooling tablet light after tooling tablet light
Tablet · Dark before tooling tablet dark after tooling tablet dark
Mobile · Light before tooling mobile light after tooling mobile light
Mobile · Dark before tooling mobile dark after tooling mobile dark

/state-of-mcp-servers:

Viewport · Theme Before After
Desktop · Light before mcp desktop light after mcp desktop light
Desktop · Dark before mcp desktop dark after mcp desktop dark
Tablet · Light before mcp tablet light after mcp tablet light
Tablet · Dark before mcp tablet dark after mcp tablet dark
Mobile · Light before mcp mobile light after mcp mobile light
Mobile · Dark before mcp mobile dark after mcp mobile dark

Validation

  • pnpm exec vitest run tests/data-reports-lib.test.ts tests/web-data-reports.test.ts — pass (issue's listed set)
  • pnpm build — succeeds (issue's listed set)
  • git diff --check — clean (issue's listed set)
  • pnpm exec vitest run tests/state-report-dataset-distribution.test.ts — 4/4 pass (2 fail on pre-fix code)
  • pnpm test — full suite, 772 files / 39826 tests pass
  • pnpm type-check — clean
  • pnpm validate:clean / pnpm validate:tasks — pass
  • pnpm exec prettier --check on changed files — clean

…f-mcp-servers Dataset JSON-LD

/state-of-claude-tooling and /state-of-mcp-servers both have working
JSON/CSV exports, but their hand-rolled "@type": "Dataset" JSON-LD
blocks never got the distribution field, so structured-data consumers
could not discover those exports while the three sibling report pages
that call buildReportDataset() advertise theirs.

Add the equivalent distribution array (two DataDownload objects,
application/json + text/csv, contentUrl via the existing
reportExportUrl() helper) to each page, matching the exact shape
buildReportDataset() produces. The hand-rolled blocks are kept, not
swapped for buildReportDataset(), to preserve their richer
page-specific variableMeasured lists.

No change to the pages visible content: JSON-LD renders no pixels.

Closes JSONbored#5455
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.5x multiplier. label Jul 25, 2026
@loopover-orb

loopover-orb Bot commented Jul 25, 2026

Copy link
Copy Markdown

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-25 07:59:03 UTC

3 files · 1 AI reviewer · no blockers · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
This PR adds a `distribution` array of two DataDownload objects (JSON + CSV via `reportExportUrl()`) to the hand-rolled Dataset JSON-LD blocks on two report pages, matching the shape `buildReportDataset()` already produces for sibling pages. Both edits are minimal, correctly scoped, use an existing helper already imported cleanly, and are backed by a new source-level test that pins the exact fields. The change is narrowly targeted, matches the stated intent, and CI passed.

Nits — 5 non-blocking
  • The new test (tests/state-report-dataset-distribution.test.ts) locates the Dataset block via `source.indexOf("};", datasetStart)`, which is a bit fragile if the object literal's formatting changes, though it works for the current file shape.
  • Consider eventually migrating these two hand-rolled Dataset blocks to `buildReportDataset()` with a `variableMeasured` override param, rather than maintaining a parallel manual shape indefinitely, to reduce future drift risk (the PR description explains this was deliberately deferred, which is reasonable for now).
  • If `buildReportDataset()` supports or could support an optional `extraVariableMeasured` param, that would let these two pages drop their manual duplication of the distribution/format logic while keeping their richer `variableMeasured` lists.
  • Possible screenshot-table issue: identical images (row 1) — Advisory only — verify the screenshot-table images against the stated change before deciding.
  • Possible screenshot-table issue: identical images (row 2) — Advisory only — verify the screenshot-table images against the stated change before deciding.

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #5455
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 90 registered-repo PR(s), 42 merged, 4 issue(s).
Contributor context ✅ Confirmed Gittensor contributor tryeverything24; Gittensor profile; 90 PR(s), 4 issue(s).
Improvement ✅ Minor risk: clean · value: minor
Linked issue satisfaction

Addressed
The diff adds a distribution array with JSON and CSV DataDownload entries (via reportExportUrl) to both state-of-claude-tooling.tsx and state-of-mcp-servers.tsx Dataset JSON-LD blocks, matching the shape produced by buildReportDataset() as requested, and adds a test pinning the change.

Review context
  • Author: tryeverything24
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: JavaScript, TypeScript, Python, HTML, C++, Java, PHP, C#
  • Official Gittensor activity: 90 PR(s), 4 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/state-of-claude-tooling desktop (light) before /state-of-claude-tooling (light)
before /state-of-claude-tooling (light)
after /state-of-claude-tooling (light)
after /state-of-claude-tooling (light)
/state-of-claude-tooling mobile (light) before /state-of-claude-tooling (mobile) (light)
before /state-of-claude-tooling (mobile) (light)
after /state-of-claude-tooling (mobile) (light)
after /state-of-claude-tooling (mobile) (light)
/state-of-mcp-servers desktop (light) before /state-of-mcp-servers (light)
before /state-of-mcp-servers (light)
after /state-of-mcp-servers (light)
after /state-of-mcp-servers (light)
/state-of-mcp-servers mobile (light) before /state-of-mcp-servers (mobile) (light)
before /state-of-mcp-servers (mobile) (light)
after /state-of-mcp-servers (mobile) (light)
after /state-of-mcp-servers (mobile) (light)
/state-of-claude-tooling desktop (dark) before /state-of-claude-tooling (dark)
before /state-of-claude-tooling (dark)
after /state-of-claude-tooling (dark)
after /state-of-claude-tooling (dark)
/state-of-claude-tooling mobile (dark) before /state-of-claude-tooling (mobile) (dark)
before /state-of-claude-tooling (mobile) (dark)
after /state-of-claude-tooling (mobile) (dark)
after /state-of-claude-tooling (mobile) (dark)
/state-of-mcp-servers desktop (dark) before /state-of-mcp-servers (dark)
before /state-of-mcp-servers (dark)
after /state-of-mcp-servers (dark)
after /state-of-mcp-servers (dark)
/state-of-mcp-servers mobile (dark) before /state-of-mcp-servers (mobile) (dark)
before /state-of-mcp-servers (mobile) (dark)
after /state-of-mcp-servers (mobile) (dark)
after /state-of-mcp-servers (mobile) (dark)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

Scroll preview
Route Before (production) After (this PR's preview)
/state-of-claude-tooling (light) before /state-of-claude-tooling (light) (scroll)
before /state-of-claude-tooling (light) (scroll)
after /state-of-claude-tooling (light) (scroll)
after /state-of-claude-tooling (light) (scroll)
/state-of-mcp-servers (light) before /state-of-mcp-servers (light) (scroll)
before /state-of-mcp-servers (light) (scroll)
after /state-of-mcp-servers (light) (scroll)
after /state-of-mcp-servers (light) (scroll)
/state-of-claude-tooling (dark) before /state-of-claude-tooling (dark) (scroll)
before /state-of-claude-tooling (dark) (scroll)
after /state-of-claude-tooling (dark) (scroll)
after /state-of-claude-tooling (dark) (scroll)
/state-of-mcp-servers (dark) before /state-of-mcp-servers (dark) (scroll)
before /state-of-mcp-servers (dark) (scroll)
after /state-of-mcp-servers (dark) (scroll)
after /state-of-mcp-servers (dark) (scroll)

A short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 25, 2026
@JSONbored
JSONbored merged commit 61640f9 into JSONbored:main Jul 26, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.5x multiplier. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: state-of-claude-tooling/state-of-mcp-servers Dataset JSON-LD omits distribution despite working exports

2 participants