Skip to content

feat(packages/config,packages/cli): source group card descriptions from overview pages - #156

Draft
zrosenbauer wants to merge 1 commit into
mainfrom
feat/landingpages
Draft

feat(packages/config,packages/cli): source group card descriptions from overview pages#156
zrosenbauer wants to merge 1 commit into
mainfrom
feat/landingpages

Conversation

@zrosenbauer

Copy link
Copy Markdown
Member

Summary

Auto-generated group landing pages left nested-group cards blank unless an explicit config description was set — even when the group had an overview.md (or index.md/readme.md). This wires up automatic description sourcing from a group's overview/root page, plus a config knob to control the inference.

The gap: a group's card/landing description was only ever sourced from the group's own page.source frontmatter or a config-level description. Auto-derived groups (glob include, no explicit description) never adopted their in-group overview, so their card fell back to an unset entry.description and rendered nothing.

Fix

Resolve a group's description once in the sync resolve layer and reuse it for both the parent card and the group's own landing intro. Precedence (highest first):

card.descriptionPage.description → group overview frontmatter description → overview first paragraph

Changes

@ciderpress/config

  • New discover.descriptionFallback: 'firstParagraph' | 'none' on Page.discover, Workspace.discover, and the top-level discover. Defaults to 'firstParagraph'; 'none' requires an explicit frontmatter description and skips first-paragraph inference.
  • Export DescriptionFallback. Regenerated schemas/schema.json.

@ciderpress/cli

  • New resolve/description.ts: extractFileDescription, findEntrySlugChild, resolveGroupDescription (shared extraction, moved out of landing.ts).
  • resolve/index.ts + recursive.ts populate entry.description for group entries from the overview page / entry-slug child / probed overview file.
  • inject.ts now consumes the resolved entry.description (drops the fragile findConfigSection + configSections threading).
  • Section cards now honor card.description, matching workspace cards.

Docs

  • docs/references/configuration.md — documents the new field and the card-description precedence.

Testing

  • New resolve/description.test.ts (16 cases): frontmatter vs first-paragraph vs none fallback, entry-slug child selection/priority, resolveGroupDescription precedence.
  • Existing sidebar.test.ts updated for the new injectLandingPages signature.
  • Full suites green: @ciderpress/cli 243 tests, @ciderpress/config 48 tests.
  • pnpm typecheck clean; targeted oxlint/oxfmt clean.
  • End-to-end verified against a real fixture: a nested API group with docs/api/overview.md now renders <SectionCard ... description="Typed REST endpoints for the platform." /> on its parent's landing (previously no description prop).

Related

Fixes blank nested-group cards on auto-generated landings.

…om overview pages

Auto-generated group landings left nested-group cards blank unless an
explicit config `description` was set — even when the group had an
`overview.md`. Resolve a group's description once in the sync resolve
layer (config > overview page > entry-slug overview child > probed
overview file) and reuse it for both the parent card and the group's
own landing intro.

- config: new `discover.descriptionFallback: 'firstParagraph' | 'none'`
  on Page/Workspace discover and the top-level discover; export
  `DescriptionFallback`. Regenerated schemas/schema.json.
- cli: shared resolve/description.ts (extractFileDescription,
  findEntrySlugChild, resolveGroupDescription); populate entry.description
  for groups in resolve/index.ts and recursive.ts; inject.ts consumes
  entry.description (drops findConfigSection); section cards now honor
  card.description.

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ciderpress Ready Ready Preview, Comment Jul 9, 2026 6:53pm

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 81abb40d-b5fb-43aa-985b-1ce35b50947e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@codspeed-hq

codspeed-hq Bot commented Jul 9, 2026

Copy link
Copy Markdown

Congrats! CodSpeed is installed 🎉

🆕 10 new benchmarks were detected.

You will start to see performance impacts in the reports once the benchmarks are run from your default branch.

Detected benchmarks


Open in CodSpeed

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