Skip to content

Fix domain surface consistency across landing page and registry#54

Open
rksharma-owg wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
rksharma-owg:fix/issue-41-surface-consistency
Open

Fix domain surface consistency across landing page and registry#54
rksharma-owg wants to merge 1 commit into
UsefulSoftwareCo:mainfrom
rksharma-owg:fix/issue-41-surface-consistency

Conversation

@rksharma-owg

Copy link
Copy Markdown

Summary

  • fix the root cause where domain-level surface formats were derived from different data sources on the homepage, baseline domain pages, and registry summaries
  • add shared logic to combine curated provider interfaces, discovered-domain catalog surfaces, and normalized catalog records into one ordered, deduplicated set of domain surface types
  • reuse that shared logic for homepage cards, prerendered domain pages, baseline /disc/{domain}.json, and surface sitemap generation

Root cause

The landing page and registry summary paths were using normalized catalog/index data, while prerendered domain pages and baseline discovery JSON were deriving visible surface types from a narrower baseline that could miss discovered-domain-only formats like CLI. That let a domain such as Notion show CLI in the registry inputs but not on the landing-page/domain representation.

Shared logic introduced

  • src/lib/domain-surface-types.ts normalizes surface type vocabulary to the project's existing mcp, openapi, graphql, cli ordering and deduplicates them
  • src/lib/domain-discovery.ts builds a consistent domain discovery document by combining discovered-domain surfaces, curated interfaces, and baseline catalog surfaces
  • src/lib/curated.ts, src/lib/discovered-catalog.ts, and src/lib/discovered-domains.ts provide reusable loaders/mappers so domain-level surface joins happen in one place rather than ad hoc in page components

Pages/components changed

  • homepage / registry summary path via src/lib/catalog.ts
  • prerendered domain page via src/pages/[domain].astro
  • baseline domain discovery JSON via src/pages/disc/[domain].json.ts
  • surface sitemap generation via src/pages/sitemap-surfaces.xml.ts

Regression tests added

  • Notion includes CLI when the underlying catalog contains it
  • duplicate surface types appear only once
  • curated-only surfaces remain visible
  • raw-catalog-only surfaces remain visible
  • a domain with no surfaces is handled safely

Commands run

  • bun install
  • bun run normalize
  • cd cli && bun run build
  • bun test ✅ (72 pass, 0 fail)
  • bun run build
  • bun run validate:batch ⚠️ fails due to pre-existing catalog data issues unrelated to this fix (catalogMissingLocator, catalogDuplicateSurface)

Before / after for Notion

Before:

  • the domain/landing-page representation for Notion omitted CLI
  • the underlying discovered/catalog data could still include a Notion CLI surface

After:

  • homepage/domain summary includes CLI for Notion
  • prerendered notion.com domain output includes MCP · REST · CLI
  • baseline /disc/notion.com.json includes the Notion CLI surface
  • /api/domains.json for notion.com includes cli in formats

Fixes #41

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.

Consistency issue: landing page vs registry entry

1 participant