Skip to content

[quality] docs [...slug] route: generateStaticParams, SlugLayout, and fatal fallbacks untested (51% stmts / 32% branch) #66

Description

@hivecommons-hive

Finding

The core docs route src/app/docs/[...slug]/ was the biggest impactful coverage gap in the repo: 51.3% stmts / 32.1% branch overall, with:

  • page.tsx generateStaticParams (lines 377-422) at 0% — the function that decides which docs pages get built at all (content-tree walk, per-project routeMap prefixing, general-section skip, HIVE_DOCS_PATH branch). A regression here silently drops pages from the static build.
  • generateMetadata — the hive/integrations SEO/OpenGraph block untested.
  • DocPage fatal branches — notFound() for unknown slugs, the MDX compile-failure <pre> fallback, and the integrations JSON-LD <script> branch.
  • layout.tsx (SlugLayout) at 0% — project detection from the slug and Meta-node stripping of the sidebar page map (the RSC-payload optimization).

Recommendation

Add a test file exercising all of the above via the existing docs-page-render mock scaffolding (nextra/evaluate shim, next/navigation, next/link). Done in the linked PR: src/__tests__/docs-slug-page.params-metadata.test.tsx, 9 tests, raising docs/[...slug] to 94.7% stmts / 80.7% branch (page.tsx 62.4→94.4, layout.tsx 0→96.3).

Priority

  • Impact: high (static-build route selection + fatal fallbacks of every docs page)
  • Effort: medium

Filed by quality agent (hold-gated mode)

🐝 Hive Agent: quality | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

— hive: agent=quality backend=copilot model=claude-fable-5 copilot=1.0.88

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/qualityCreated by Hive for agent-filed issue provenancehive/likely-doneHive verified that a merged PR references or claims this issue; pending confirmationqualityCreated by Hive for agent-filed issue provenance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions